1.1 --- a/inspector.py Tue Sep 06 17:18:11 2016 +0200
1.2 +++ b/inspector.py Tue Sep 06 23:38:05 2016 +0200
1.3 @@ -130,12 +130,12 @@
1.4 if name in predefined_constants or in_function and name in self.function_locals[path]:
1.5 continue
1.6
1.7 - # Find local definitions (within static namespaces).
1.8 + # Find local definitions (within dynamic namespaces).
1.9
1.10 key = "%s.%s" % (path, name)
1.11 ref = self.get_resolved_object(key)
1.12 if ref:
1.13 - self.importer.all_name_references[key] = self.name_references[key] = ref.alias(key)
1.14 + self.importer.all_name_references[key] = self.name_references[key] = ref
1.15 continue
1.16
1.17 # Find global or built-in definitions.
1.18 @@ -789,6 +789,7 @@
1.19 # Attempt to get a reference.
1.20
1.21 ref = self.import_name_from_module(op, "operator")
1.22 + self.add_deferred(ref)
1.23
1.24 # Record the imported name and provide the resolved name reference.
1.25