1.1 --- a/micropython/__init__.py Sun Nov 22 20:04:05 2009 +0100
1.2 +++ b/micropython/__init__.py Sun Nov 22 20:22:05 2009 +0100
1.3 @@ -484,6 +484,11 @@
1.4
1.5 "Collect attribute references for the entire program."
1.6
1.7 + # Start with the "root" modules, finding referenced objects.
1.8 +
1.9 + self._collect_attributes("__builtins__", objtable)
1.10 + self._collect_attributes("__main__", objtable)
1.11 +
1.12 # Include names which may not be explicitly used in programs.
1.13 # NOTE: Potentially declare these when inspecting.
1.14
1.15 @@ -491,11 +496,6 @@
1.16 for objname in objtable.all_possible_objects([name]):
1.17 self.use_attribute(objname, name)
1.18
1.19 - # Start with the "root" modules, finding referenced objects.
1.20 -
1.21 - self._collect_attributes("__builtins__", objtable)
1.22 - self._collect_attributes("__main__", objtable)
1.23 -
1.24 def _collect_attributes(self, from_name, objtable):
1.25
1.26 """