[pypy-svn] rev 1132 - pypy/branch/builtinrefactor/pypy/objspace

hpk at codespeak.net hpk at codespeak.net
Mon Jul 14 15:47:14 CEST 2003


Author: hpk
Date: Mon Jul 14 15:47:13 2003
New Revision: 1132

Modified:
   pypy/branch/builtinrefactor/pypy/objspace/trivial.py
Log:
- fixed wrong cloning of exceptions
  (try raise ValueError on the cmdline in the previous revision)

- excluded 'xrange' from the list of "imported" types from __builtin__
  probably 'standard_types' should be defined more explicitely...



Modified: pypy/branch/builtinrefactor/pypy/objspace/trivial.py
==============================================================================
--- pypy/branch/builtinrefactor/pypy/objspace/trivial.py	(original)
+++ pypy/branch/builtinrefactor/pypy/objspace/trivial.py	Mon Jul 14 15:47:13 2003
@@ -122,7 +122,7 @@
                             continue
                         else:
                             base = done[b.__name__]
-                            newtype = type(k, (base,), {})
+                            newtype = type(next, (base,), {})
                             setattr(self, 'w_' + next, newtype)
                             done[next] = newtype
                             stack.pop()
@@ -143,10 +143,12 @@
                     "None" : self.w_None,
                     "Ellipsis" : self.w_Ellipsis,
                     "buffer": buffer,
-                    "xrange": xrange,
+                    #"xrange": xrange,
                     "slice": slice,
                     }
         for n, c in __builtin__.__dict__.iteritems():
+            if n == 'xrange': # we define this in builtin_app
+                continue
             if isinstance(c, types.TypeType):
                 setattr(self, 'w_' + c.__name__, c)
                 newstuff[c.__name__] = c


More information about the Pypy-commit mailing list