fix issues with equal names before and after listcomprehension

This commit is contained in:
Dave Halter
2014-06-09 20:28:24 +02:00
parent 0b926ca454
commit cd5b8aebfd

View File

@@ -469,6 +469,8 @@ def get_names_of_scope(evaluator, scope, position=None, star_search=True, includ
:rtype: [(pr.Scope, [pr.Name])]
:return: Return an generator that yields a pair of scope and names.
"""
if isinstance(scope, iterable.ListComprehensionFlow):
position = scope.list_comprehension.parent.start_pos
in_func_scope = scope
non_flow = scope.get_parent_until(pr.Flow, reverse=True)
while scope: