1.1 --- a/inspector.py Tue Oct 25 22:26:03 2016 +0200
1.2 +++ b/inspector.py Tue Oct 25 23:06:37 2016 +0200
1.3 @@ -126,12 +126,20 @@
1.4 in_function = self.function_locals.has_key(path)
1.5
1.6 for name in names:
1.7 - if name in predefined_constants or in_function and name in self.function_locals[path]:
1.8 + if in_function and name in self.function_locals[path]:
1.9 + continue
1.10 +
1.11 + key = "%s.%s" % (path, name)
1.12 +
1.13 + # Find predefined constant names before anything else.
1.14 +
1.15 + if name in predefined_constants:
1.16 + ref = self.get_builtin(name)
1.17 + self.set_name_reference(key, ref)
1.18 continue
1.19
1.20 # Find local definitions (within dynamic namespaces).
1.21
1.22 - key = "%s.%s" % (path, name)
1.23 ref = self.get_resolved_object(key)
1.24 if ref:
1.25 self.set_name_reference(key, ref)