1.1 --- a/micropython/__init__.py Sat Jun 30 21:18:06 2012 +0200
1.2 +++ b/micropython/__init__.py Sun Jul 01 00:09:50 2012 +0200
1.3 @@ -534,6 +534,8 @@
1.4 self.name_references[from_name] = set()
1.5
1.6 attrnames = ObjectSet([name])
1.7 + if value is not None:
1.8 + attrnames[name].add(value)
1.9 usage = (attrnames,)
1.10 self.name_references[from_name].add((None, None, usage))
1.11
2.1 --- a/micropython/data.py Sat Jun 30 21:18:06 2012 +0200
2.2 +++ b/micropython/data.py Sun Jul 01 00:09:50 2012 +0200
2.3 @@ -613,10 +613,10 @@
2.4
2.5 users = self.attribute_users[-1]
2.6
2.7 - # If no users are defined for the name, provide the current namespace.
2.8 + # If no users are defined for the name, it cannot be handled.
2.9
2.10 if not users.has_key(name):
2.11 - self._define_attribute_user_for_name(self.astnode, name)
2.12 + return []
2.13
2.14 # Add the usage to all current users.
2.15
3.1 --- a/micropython/inspect.py Sat Jun 30 21:18:06 2012 +0200
3.2 +++ b/micropython/inspect.py Sun Jul 01 00:09:50 2012 +0200
3.3 @@ -603,9 +603,7 @@
3.4 # independently of the namespace), or access via a module global within
3.5 # a function.
3.6
3.7 - if expr.parent is self.get_namespace() and not self.get_namespace() is self or \
3.8 - expr.parent is self and self.in_function:
3.9 -
3.10 + if expr.parent is self.get_namespace() and not self.get_namespace() is self:
3.11 self.define_attribute_accessor(expr.name, attrname, node, value)
3.12 else:
3.13 self.use_name(attrname, node.expr, value, ns=expr.parent)