1.1 --- a/micropython/inspect.py Tue Jun 19 00:29:57 2012 +0200
1.2 +++ b/micropython/inspect.py Wed Jun 20 00:44:03 2012 +0200
1.3 @@ -582,9 +582,11 @@
1.4 where such attributes are inferred from the usage.
1.5 """
1.6
1.7 - # Access to attribute via a local.
1.8 + # Access to attribute via a local in functions or classes but not
1.9 + # modules (since module-level locals are globals that can be modified
1.10 + # independently of the namespace).
1.11
1.12 - if expr.parent is self.get_namespace():
1.13 + if expr.parent is self.get_namespace() and not self.get_namespace() is self:
1.14
1.15 # NOTE: Revisiting of nodes may occur for loops.
1.16