Commit 91d3c9fc authored by Robert Bradshaw's avatar Robert Bradshaw

Workaround for T441, enumerate optimization bug.

parent 07ef7b16
...@@ -236,6 +236,10 @@ class IterationTransform(Visitor.VisitorTransform): ...@@ -236,6 +236,10 @@ class IterationTransform(Visitor.VisitorTransform):
if not counter_type.is_pyobject and not counter_type.is_int: if not counter_type.is_pyobject and not counter_type.is_int:
# nothing we can do here, I guess # nothing we can do here, I guess
return node return node
if iterable_target.type is not PyrexTypes.py_object_type:
# this may need conversion, could be made to work
return node
temp = UtilNodes.LetRefNode(ExprNodes.IntNode(enumerate_function.pos, temp = UtilNodes.LetRefNode(ExprNodes.IntNode(enumerate_function.pos,
value='0', value='0',
......
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