changeset 35:23aa8da5be5f

compat.py now emulates the next() built-in in Python 2.5
author Oleg Oshmyan <chortos@inbox.lv>
date Fri, 03 Dec 2010 01:19:55 +0000
parents 8fec38b0dd6e
children faf0254fe279
files 2.00/compat.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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