[pypy-svn] r15267 - in pypy/branch/pypy-newobjspace: interpreter module/sys

rxe at codespeak.net rxe at codespeak.net
Thu Jul 28 18:03:49 CEST 2005


Author: rxe
Date: Thu Jul 28 18:03:47 2005
New Revision: 15267

Modified:
   pypy/branch/pypy-newobjspace/interpreter/baseobjspace.py
   pypy/branch/pypy-newobjspace/module/sys/state.py
Log:
Rationalise get_builtinmodule_list() a tiny bit.



Modified: pypy/branch/pypy-newobjspace/interpreter/baseobjspace.py
==============================================================================
--- pypy/branch/pypy-newobjspace/interpreter/baseobjspace.py	(original)
+++ pypy/branch/pypy-newobjspace/interpreter/baseobjspace.py	Thu Jul 28 18:03:47 2005
@@ -148,15 +148,17 @@
             return self._builtinmodule_list
         except AttributeError:
             pass
-        l = 'sys __builtin__ exceptions unicodedata _codecs'.split() 
+
+        l = ['unicodedata', '_codecs']
+
         if self.options.nofaking:
             l.append('posix')
             l.append('math')
+
         for name in self.options.usemodules: 
-            if name in l: 
-                continue
-            # XXX error throwing (catch wrong names)
-            l.append(name) 
+            if name not in l: 
+                l.append(name) 
+
         builtinmodule_list = [(x, None) for x in l]
         if self.options.parser == "recparser":
             builtinmodule_list.append(('parser', 'recparser'))

Modified: pypy/branch/pypy-newobjspace/module/sys/state.py
==============================================================================
--- pypy/branch/pypy-newobjspace/module/sys/state.py	(original)
+++ pypy/branch/pypy-newobjspace/module/sys/state.py	Thu Jul 28 18:03:47 2005
@@ -2,7 +2,6 @@
 Implementation of interpreter-level 'sys' routines.
 """
 import pypy
-#from pypy.interpreter.module import Module
 from pypy.interpreter.error import OperationError
 
 import sys, os 



More information about the Pypy-commit mailing list