Author: Armin Rigo <[email protected]>
Branch:
Changeset: r50097:d5a684ab8934
Date: 2011-12-03 18:32 +0100
http://bitbucket.org/pypy/pypy/changeset/d5a684ab8934/
Log: Try out the approach described on issue945 on the itertools module.
diff --git a/lib_pypy/itertools.py b/lib_pypy/_itertools.py
rename from lib_pypy/itertools.py
rename to lib_pypy/_itertools.py
--- a/lib_pypy/itertools.py
+++ b/lib_pypy/_itertools.py
@@ -1,5 +1,5 @@
-# Note that PyPy contains also a built-in module 'itertools' which will
-# hide this one if compiled in.
+# Note that PyPy contains also a built-in implementation of 'itertools';
+# when translated with default options, this one is not used.
"""Functional tools for creating and using iterators.
diff --git a/pypy/module/itertools/__init__.py
b/pypy/module/itertools/__init__.py
--- a/pypy/module/itertools/__init__.py
+++ b/pypy/module/itertools/__init__.py
@@ -23,6 +23,7 @@
dropwhile(pred, seq) --> seq[n], seq[n+1], starting when pred fails
groupby(iterable[, keyfunc]) --> sub-iterators grouped by value of
keyfunc(v)
"""
+ applevel_name = '__builtin_itertools'
interpleveldefs = {
'chain' : 'interp_itertools.W_Chain',
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit