# HG changeset patch # User Oleg Oshmyan # Date 1291339195 0 # Node ID 23aa8da5be5fb9a4859322aba171e23681fb9b58 # Parent 8fec38b0dd6eec774823f3f709375c7b4e73b5e2 compat.py now emulates the next() built-in in Python 2.5 diff -r 8fec38b0dd6e -r 23aa8da5be5f 2.00/compat.py --- a/2.00/compat.py Tue Nov 30 00:18:17 2010 +0000 +++ b/2.00/compat.py Fri Dec 03 01:19:55 2010 +0000 @@ -153,6 +153,11 @@ callable = lambda obj: hasattr(obj, '__call__') try: + next = next +except NameError: + next = lambda obj: obj.next() + +try: from itertools import imap as map except ImportError: map = map