1.1 --- a/micropython/data.py Sun Jun 19 02:01:51 2011 +0200
1.2 +++ b/micropython/data.py Sun Jun 19 02:07:58 2011 +0200
1.3 @@ -174,7 +174,7 @@
1.4 node._scope = scope
1.5 self.note_scope(name, scope)
1.6
1.7 - if full_name is not None:
1.8 + if full_name is not None and (scope != "local" or self is self.module):
1.9 self.use_specific_attribute(full_name, name)
1.10
1.11 return attr
1.12 @@ -470,7 +470,7 @@
1.13 # These shadow various methods in the InspectedModule class, and provide
1.14 # implementations generally.
1.15
1.16 - def _use_specific_attribute(self, objname, attrname):
1.17 + def _use_specific_attribute(self, objname, attrname, from_name=None):
1.18
1.19 """
1.20 Note attribute usage specifically on 'objname' - an object which is
1.21 @@ -480,7 +480,7 @@
1.22 This bypasses attribute user mechanisms.
1.23 """
1.24
1.25 - from_name = self.full_name()
1.26 + from_name = from_name or self.full_name()
1.27 objname = objname or from_name
1.28 module = self.module
1.29 importer = module and module.importer