# HG changeset patch # User Paul Boddie # Date 1258917725 -3600 # Node ID 24342b91c0b01da5bda90d6450659e25a1e55aec # Parent 85e350584da735ff319c3f273515981cddf49fe7 Reordered attribute/name traversal initialisation in order to avoid missing the builtins module. Fixed docstring wording. diff -r 85e350584da7 -r 24342b91c0b0 lib/builtins.py --- a/lib/builtins.py Sun Nov 22 20:04:05 2009 +0100 +++ b/lib/builtins.py Sun Nov 22 20:22:05 2009 +0100 @@ -1,7 +1,7 @@ #!/usr/bin/env python """ -Simple built-in classes and functions. Objects which provide code which shall +Simple built-in classes and functions. Objects which provide code that shall always be compiled should provide docstrings. Copyright (C) 2005, 2006, 2007, 2008, 2009 Paul Boddie diff -r 85e350584da7 -r 24342b91c0b0 micropython/__init__.py --- a/micropython/__init__.py Sun Nov 22 20:04:05 2009 +0100 +++ b/micropython/__init__.py Sun Nov 22 20:22:05 2009 +0100 @@ -484,6 +484,11 @@ "Collect attribute references for the entire program." + # Start with the "root" modules, finding referenced objects. + + self._collect_attributes("__builtins__", objtable) + self._collect_attributes("__main__", objtable) + # Include names which may not be explicitly used in programs. # NOTE: Potentially declare these when inspecting. @@ -491,11 +496,6 @@ for objname in objtable.all_possible_objects([name]): self.use_attribute(objname, name) - # Start with the "root" modules, finding referenced objects. - - self._collect_attributes("__builtins__", objtable) - self._collect_attributes("__main__", objtable) - def _collect_attributes(self, from_name, objtable): """