1.1 --- a/micropython/__init__.py Sun Apr 26 18:02:56 2009 +0200
1.2 +++ b/micropython/__init__.py Sun Apr 26 18:26:46 2009 +0200
1.3 @@ -108,6 +108,7 @@
1.4
1.5 for module in self.importer.modules_ordered:
1.6 pos = len(self.code)
1.7 + suppress_builtins = not with_builtins and module.name == "__builtins__"
1.8
1.9 # Position the module in the image and make a translation.
1.10
1.11 @@ -142,7 +143,7 @@
1.12
1.13 # Omit built-in function code where requested.
1.14
1.15 - if not with_builtins and module.name == "__builtins__":
1.16 + if suppress_builtins:
1.17 continue
1.18
1.19 # Generate the instantiator/initialiser.
1.20 @@ -173,7 +174,7 @@
1.21
1.22 # Omit built-in function code where requested.
1.23
1.24 - if not with_builtins and module.name == "__builtins__":
1.25 + if suppress_builtins:
1.26 pass
1.27
1.28 # Append the function code to the image.
1.29 @@ -185,7 +186,7 @@
1.30
1.31 # Omit built-in module code where requested.
1.32
1.33 - if not with_builtins and module.name == "__builtins__":
1.34 + if suppress_builtins:
1.35 pass
1.36
1.37 # Append the module top-level code to the image.