[pypy-svn] r9247 - in pypy/branch/dist-interpapp/pypy: interpreter module/builtin

hpk at codespeak.net hpk at codespeak.net
Wed Feb 16 16:09:27 CET 2005


Author: hpk
Date: Wed Feb 16 16:09:27 2005
New Revision: 9247

Modified:
   pypy/branch/dist-interpapp/pypy/interpreter/baseobjspace.py
   pypy/branch/dist-interpapp/pypy/module/builtin/__init__.py
Log:
slight renaming and a TEMPORARY hack to 
make 'builtin' directly available in the
current __builtin__ :-) 

type 

    builtin.map 

to see that it works and 

    builtin.__dict__ 
   
to see where the unlazifying fails :-) 



Modified: pypy/branch/dist-interpapp/pypy/interpreter/baseobjspace.py
==============================================================================
--- pypy/branch/dist-interpapp/pypy/interpreter/baseobjspace.py	(original)
+++ pypy/branch/dist-interpapp/pypy/interpreter/baseobjspace.py	Wed Feb 16 16:09:27 2005
@@ -74,6 +74,11 @@
 
         self.sys.setbuiltinmodule(self.w_builtin, '__builtin__')
 
+        # XXX TEMPORARY 
+        from pypy.module.builtin import Module 
+        w_name = self.wrap('builtin')
+        self.setitem(self.w_builtins, w_name, Module(self, w_name))
+
     def make_sys(self):
         "NOT_RPYTHON: only for initializing the space."
         from pypy.interpreter.extmodule import BuiltinModule

Modified: pypy/branch/dist-interpapp/pypy/module/builtin/__init__.py
==============================================================================
--- pypy/branch/dist-interpapp/pypy/module/builtin/__init__.py	(original)
+++ pypy/branch/dist-interpapp/pypy/module/builtin/__init__.py	Wed Feb 16 16:09:27 2005
@@ -1,13 +1,12 @@
-from pypy.interpreter.extmodule import ExtModule
+from pypy.interpreter.newmodule import ExtModule
 
-
-class BuiltinModule(ExtModule):
+class Module(ExtModule):
     """Built-in functions, exceptions, and other objects.
 
 Noteworthy: None is the `nil' object; Ellipsis represents `...' in slices.
 """
 
-    _applevel_ = {
+    appleveldefs = {
         'quit'          : 'app_help.exit',
         'exit'          : 'app_help.exit',
         'copyright'     : 'app_help.copyright',
@@ -54,7 +53,7 @@
         'reload'        : 'app_misc.reload',
     }
 
-    _interplevel_ = {
+    interpleveldefs = {
         # constants
         'None'          : '(space.w_None)',
         'False'         : '(space.w_False)',



More information about the Pypy-commit mailing list