1.1 --- a/micropython/inspect.py Wed Jul 04 00:27:29 2012 +0200
1.2 +++ b/micropython/inspect.py Wed Jul 04 00:42:04 2012 +0200
1.3 @@ -200,6 +200,8 @@
1.4 # NOTE: point and just set an instance instead.
1.5
1.6 self.set(name, make_instance(), False)
1.7 + self.modified_names.add(name)
1.8 +
1.9 else:
1.10 self.process_globals(n)
1.11
1.12 @@ -1079,19 +1081,6 @@
1.13
1.14 # The name is recorded in an earlier process.
1.15
1.16 - # Since the presence of a global declaration may
1.17 - # indicate the modification of a name, and this may
1.18 - # happen during initialisation, the name is recorded
1.19 - # and any usage observations ultimately revoked.
1.20 -
1.21 - # NOTE: Actual modification could be detected by
1.22 - # NOTE: establishing a path from the module top-level to
1.23 - # NOTE: an actual assignment.
1.24 -
1.25 - if not self.modified_names.has_key(ns):
1.26 - self.modified_names[ns] = set()
1.27 - self.modified_names[ns].add(name)
1.28 -
1.29 def visitIf(self, node):
1.30 self.use_name("__bool__", node)
1.31 self.new_branchpoint()