Author: Alex Gaynor <[email protected]>
Branch:
Changeset: r56843:7a75bcc99f30
Date: 2012-08-24 11:37 -0700
http://bitbucket.org/pypy/pypy/changeset/7a75bcc99f30/
Log: Only include next() in the table if it's defined.
diff --git a/pypy/objspace/flow/operation.py b/pypy/objspace/flow/operation.py
--- a/pypy/objspace/flow/operation.py
+++ b/pypy/objspace/flow/operation.py
@@ -210,7 +210,6 @@
('coerce', coerce),
('iter', iter),
('next', next),
- ('next', getattr(__builtin__, 'next', lambda x: x.__next__())),
('get', get),
('set', set),
('delete', delete),
@@ -229,7 +228,9 @@
('div_ovf', div_ovf),
('mod_ovf', mod_ovf),
('lshift_ovf', lshift_ovf),
- ]
+]
+if hasattr(__builtin__, 'next'):
+ Table.append(('next', __builtin__.next))
def setup():
# insert all operators
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit