no confusions in executions for dict assignments, fixes #83

This commit is contained in:
David Halter committed 2012-12-19 21:23:50 +01:00
1 parent bb31d3de3f
commit ca21f76128
3 files changed
+8 -3

No files matched your search

+5 -1
View File
@@ -1066,13 +1066,17 @@ def get_scopes_for_name(scope, name_str, position=None, search_global=False,
if is_execution(a):
return True
elif a.isinstance(parsing.Call):
if a.name == name and a.execution:
# Compare start_pos, because names may be different
# because of executions.
if a.name.start_pos == name.start_pos \
and a.execution:
return True
return False
is_exe = False
for op, assignee in par.assignment_details:
is_exe |= is_execution(assignee)
if is_exe:
# filter array[3] = ...
# TODO check executions for dict contents