Commits

Alex Gaynor committed 7a75bcc

Only include next() in the table if it's defined.

  • Participants
  • Parent commits b21f47d

Comments (0)

Files changed (1)

pypy/objspace/flow/operation.py

     ('coerce',          coerce),
     ('iter',            iter),
     ('next',            next),
-    ('next',            getattr(__builtin__, 'next', lambda x: x.__next__())),
     ('get',             get),
     ('set',             set),
     ('delete',          delete),
     ('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