list() builtin is working better now

This commit is contained in:
David Halter
2012-08-06 21:26:05 +02:00
parent 6ae98ba2f6
commit bef8fca57d
3 changed files with 18 additions and 2 deletions

View File

@@ -937,7 +937,8 @@ def get_scopes_for_name(scope, name_str, position=None, search_global=False):
and scope.var == name.parent.parent:
name = InstanceElement(scope.instance, name)
par = name.parent
if isinstance(par, parsing.Flow):
if isinstance(par, parsing.Flow) or isinstance(par,
InstanceElement) and isinstance(par.var, parsing.Flow) :
if par.command == 'for':
# Take the first statement (for has always only
# one, remember `in`). And follow it. After that,