Commit da68bab8 authored by Stefan Behnel's avatar Stefan Behnel

cleanup

parent 91075fb3
...@@ -116,16 +116,14 @@ class IterationTransform(Visitor.VisitorTransform): ...@@ -116,16 +116,14 @@ class IterationTransform(Visitor.VisitorTransform):
node, dict_obj, keys, values) node, dict_obj, keys, values)
# enumerate() ? # enumerate() ?
if iterator.self is None and \ if iterator.self is None and function.is_name and \
isinstance(function, ExprNodes.NameNode) and \
function.entry and function.entry.is_builtin and \ function.entry and function.entry.is_builtin and \
function.name == 'enumerate': function.name == 'enumerate':
return self._transform_enumerate_iteration(node, iterator) return self._transform_enumerate_iteration(node, iterator)
# range() iteration? # range() iteration?
if Options.convert_range and node.target.type.is_int: if Options.convert_range and node.target.type.is_int:
if iterator.self is None and \ if iterator.self is None and function.is_name and \
isinstance(function, ExprNodes.NameNode) and \
function.entry and function.entry.is_builtin and \ function.entry and function.entry.is_builtin and \
function.name in ('range', 'xrange'): function.name in ('range', 'xrange'):
return self._transform_range_iteration(node, iterator) return self._transform_range_iteration(node, iterator)
......
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