builtin mixins support (functions custom defined)

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

7
mixin/__builtin__.py Normal file
View File

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