Commit 5d30ad61 authored by Stefan Behnel's avatar Stefan Behnel

keep portability fix in generators.pyx to keep it working with older Python versions

parent e946e51b
...@@ -7,6 +7,10 @@ except ImportError: ...@@ -7,6 +7,10 @@ except ImportError:
def next(it): def next(it):
return it.next() return it.next()
if hasattr(__builtins__, 'GeneratorExit'):
GeneratorExit = __builtins__.GeneratorExit
else: # < 2.5
GeneratorExit = StopIteration
def very_simple(): def very_simple():
""" """
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment