1.1 --- a/micropython/inspect.py Mon Jul 02 00:58:10 2012 +0200
1.2 +++ b/micropython/inspect.py Tue Jul 03 01:16:03 2012 +0200
1.3 @@ -598,12 +598,12 @@
1.4 where such attributes are inferred from the usage.
1.5 """
1.6
1.7 - # Access to attributes via a local in functions or classes but not
1.8 - # modules (since module-level locals are globals that can be modified
1.9 - # independently of the namespace), or access via a module global within
1.10 - # a function.
1.11 + # Access to attributes via a local in functions, classes or modules.
1.12 + # Since module-level locals are globals that can be modified
1.13 + # independently of the namespace, any attribute usage observations made
1.14 + # here may be revoked later if such modification is thought to occur.
1.15
1.16 - if expr.parent is self.get_namespace() and not self.get_namespace() is self:
1.17 + if expr.parent is self.get_namespace():
1.18 self.define_attribute_accessor(expr.name, attrname, node, value)
1.19 else:
1.20 self.use_name(attrname, node.expr, value, ns=expr.parent)