# HG changeset patch # User Paul Boddie # Date 1382818989 -7200 # Node ID a4febea88ef4bb6aa9521d2bb6cb83c584e97a4b # Parent dc995825c69f69c5df6b26fefbeacdb701ff0d6e Introduced nodes defining class and function names to avoid annotation conflicts. diff -r dc995825c69f -r a4febea88ef4 micropython/inspect.py --- a/micropython/inspect.py Sat Oct 26 22:21:12 2013 +0200 +++ b/micropython/inspect.py Sat Oct 26 22:23:09 2013 +0200 @@ -809,6 +809,7 @@ # Store the function. if name is not None: + self.define_attribute_user(compiler.ast.AssName(name, "OP_ASSIGN")) self.store(name, function, static_def=True) else: self.store_lambda(function) @@ -1033,7 +1034,7 @@ # Make an entry for the class in the parent namespace. self.namespaces.pop() - self.define_attribute_user(node) + self.define_attribute_user(compiler.ast.AssName(node.name, "OP_ASSIGN")) self.store(node.name, cls, static_def=True) self.add_object(cls)