Commit bb8cd827 authored by Vitja Makarov's avatar Vitja Makarov

Fix Python2.4 issue

parent 4abd0ca8
...@@ -1377,8 +1377,8 @@ class MarkClosureVisitor(CythonTransform): ...@@ -1377,8 +1377,8 @@ class MarkClosureVisitor(CythonTransform):
collector.visitchildren(node) collector.visitchildren(node)
if collector.yields: if collector.yields:
for i, yield_expr in enumerate(collector.yields, 1): for i, yield_expr in enumerate(collector.yields):
yield_expr.label_num = i yield_expr.label_num = i + 1
gbody = Nodes.GeneratorBodyDefNode(pos=node.pos, gbody = Nodes.GeneratorBodyDefNode(pos=node.pos,
name=node.name, name=node.name,
......
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