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
+1 -1
View File
@@ -102,7 +102,7 @@ class Evaluator(object):
f = finder.NameFinder(self, scope, name_str, position) f = finder.NameFinder(self, scope, name_str, position)
scopes = f.scopes(search_global) scopes = f.scopes(search_global)
if is_goto: if is_goto:
return f.filter_name(scopes) return f.filter_name(scopes, search_global)
return f.find(scopes, search_global) return f.find(scopes, search_global)
@memoize_default(default=[], evaluator_is_first_arg=True) @memoize_default(default=[], evaluator_is_first_arg=True)
+1 -1
View File
@@ -79,7 +79,7 @@ class NameFinder(object):
search_str = str(self.name_str) search_str = str(self.name_str)
try: try:
names = names_dict[search_str] 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 [] return []
except KeyError: except KeyError:
return [] return []