# HG changeset patch # User Paul Boddie # Date 1258921301 -3600 # Node ID 4f3eebcf1024a9664869970c6c5e99fd37446a37 # Parent 24342b91c0b01da5bda90d6450659e25a1e55aec Added missing namespace finalisation for classes. diff -r 24342b91c0b0 -r 4f3eebcf1024 micropython/inspect.py --- a/micropython/inspect.py Sun Nov 22 20:22:05 2009 +0100 +++ b/micropython/inspect.py Sun Nov 22 21:21:41 2009 +0100 @@ -147,14 +147,14 @@ for node, namespaces in self.functions: self.process_globals(node) + self.finalise_namespace(self) + # Then, visit each function, recording other names. for node, namespaces in self.functions: self._visitFunctionBody(node, namespaces) self.finalise_namespace(namespaces[-1]) - self.finalise_namespace(self) - # Add references to other modules declared using the __all__ global. if self.has_key("__all__"): @@ -595,6 +595,7 @@ self.namespaces.append(cls) self.dispatch(node.code) + self.finalise_namespace(cls) self.namespaces.pop() return cls