builtin mixins support (functions custom defined)

This commit is contained in:
David Halter committed 2012-05-12 01:24:19 +02:00
1 parent 9b525633e5
commit b118f7f14f
2 files changed
+51 -4

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
def next(iterator, default=None):
if hasattr("next"):
return iterator.next()
else:
return iterator.__next__()
return default