[pypy-svn] r5584 - in pypy/trunk/src/pypy: module objspace/std

mwh at codespeak.net mwh at codespeak.net
Thu Jul 15 12:41:36 CEST 2004


Author: mwh
Date: Thu Jul 15 12:41:35 2004
New Revision: 5584

Modified:
   pypy/trunk/src/pypy/module/__builtin__interp.py
   pypy/trunk/src/pypy/module/__builtin__module.py
   pypy/trunk/src/pypy/objspace/std/objspace.py
Log:
There's nothing so special about files!


Modified: pypy/trunk/src/pypy/module/__builtin__interp.py
==============================================================================
--- pypy/trunk/src/pypy/module/__builtin__interp.py	(original)
+++ pypy/trunk/src/pypy/module/__builtin__interp.py	Thu Jul 15 12:41:35 2004
@@ -8,7 +8,6 @@
 _noarg = object()
 
 import __builtin__ as cpy_builtin
-w_file = space.wrap(cpy_builtin.file)
 
 # import useful app-level functions
 from __applevel__ import execfile, callable, _iter_generator

Modified: pypy/trunk/src/pypy/module/__builtin__module.py
==============================================================================
--- pypy/trunk/src/pypy/module/__builtin__module.py	(original)
+++ pypy/trunk/src/pypy/module/__builtin__module.py	Thu Jul 15 12:41:35 2004
@@ -13,6 +13,8 @@
 # XXX these are faked:
 basestring = __interplevel__eval('space.wrap(basestring)')
 unicode = __interplevel__eval('space.wrap(unicode)')
+file = __interplevel__eval('space.wrap(file)')
+open = file
 
 # TODO Fix this later to show Ctrl-D on Unix
 quit = exit = "Use Ctrl-Z (i.e. EOF) to exit."
@@ -446,9 +448,6 @@
 from __interplevel__ import compile, eval
 from __interplevel__ import globals, locals, _caller_globals, _caller_locals
 
-from __interplevel__ import file
-from __interplevel__ import file as open
-
 # The following must be the last import from __interplevel__ because it
 # overwrites the special __import__ hook with the normal one.
 from __interplevel__ import __import__

Modified: pypy/trunk/src/pypy/objspace/std/objspace.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/objspace.py	(original)
+++ pypy/trunk/src/pypy/objspace/std/objspace.py	Thu Jul 15 12:41:35 2004
@@ -157,7 +157,6 @@
         global W_TupleObject, W_ListObject, W_DictObject, W_StringObject
         global W_TypeObject, W_SliceObject, W_LongObject, W_NoneObject
         global W_SeqIterObject
-        global W_FakeFile
         W_ObjectObject = objectobject.W_ObjectObject
         W_BoolObject = boolobject.W_BoolObject
         W_IntObject = intobject.W_IntObject
@@ -194,14 +193,6 @@
             w_type = self.gettypeobject(typedef)
             setattr(self, 'w_' + typedef.name, w_type)
             for_builtins[typedef.name] = w_type
-
-        import fake
-        W_FakeFile = fake.fake_type(self, file)
-
-        self.w_file = self.gettypeobject(W_FakeFile.typedef)
-        for_builtins['file'] = self.w_file
-        self.fake_type_cache[file] = W_FakeFile
-        
         
         # exceptions
         for_builtins.update(self.clone_exception_hierarchy())



More information about the Pypy-commit mailing list