1.1 --- a/micropython/inspect.py Sun Nov 22 20:22:05 2009 +0100
1.2 +++ b/micropython/inspect.py Sun Nov 22 21:21:41 2009 +0100
1.3 @@ -147,14 +147,14 @@
1.4 for node, namespaces in self.functions:
1.5 self.process_globals(node)
1.6
1.7 + self.finalise_namespace(self)
1.8 +
1.9 # Then, visit each function, recording other names.
1.10
1.11 for node, namespaces in self.functions:
1.12 self._visitFunctionBody(node, namespaces)
1.13 self.finalise_namespace(namespaces[-1])
1.14
1.15 - self.finalise_namespace(self)
1.16 -
1.17 # Add references to other modules declared using the __all__ global.
1.18
1.19 if self.has_key("__all__"):
1.20 @@ -595,6 +595,7 @@
1.21
1.22 self.namespaces.append(cls)
1.23 self.dispatch(node.code)
1.24 + self.finalise_namespace(cls)
1.25 self.namespaces.pop()
1.26
1.27 return cls