Fix goto.

This commit is contained in:
Dave Halter
2015-01-05 23:55:38 +01:00
parent 65b33013e5
commit 54fcf7af9d
2 changed files with 2 additions and 2 deletions

View File

@@ -102,7 +102,7 @@ class Evaluator(object):
f = finder.NameFinder(self, scope, name_str, position)
scopes = f.scopes(search_global)
if is_goto:
return f.filter_name(scopes)
return f.filter_name(scopes, search_global)
return f.find(scopes, search_global)
@memoize_default(default=[], evaluator_is_first_arg=True)

View File

@@ -79,7 +79,7 @@ class NameFinder(object):
search_str = str(self.name_str)
try:
names = names_dict[search_str]
if not names: # There must be something in there otherwise stop.
if not names: # We want names, otherwise stop.
return []
except KeyError:
return []