[pypy-svn] r4959 - pypy/branch/src-newobjectmodel/pypy/objspace/std

mwh at codespeak.net mwh at codespeak.net
Sat Jun 5 14:39:24 CEST 2004


Author: mwh
Date: Sat Jun  5 14:39:23 2004
New Revision: 4959

Modified:
   pypy/branch/src-newobjectmodel/pypy/objspace/std/inttype.py
Log:
bug in int.__new__


Modified: pypy/branch/src-newobjectmodel/pypy/objspace/std/inttype.py
==============================================================================
--- pypy/branch/src-newobjectmodel/pypy/objspace/std/inttype.py	(original)
+++ pypy/branch/src-newobjectmodel/pypy/objspace/std/inttype.py	Sat Jun  5 14:39:23 2004
@@ -7,8 +7,8 @@
     if w_base is None:
         w_base = space.w_None
     if w_value is None:
-        space.newint(0)
-    if w_base == space.w_None and not space.is_true(space.isinstance(w_value, space.w_str)):
+        w_obj = space.newint(0)
+    elif w_base == space.w_None and not space.is_true(space.isinstance(w_value, space.w_str)):
             w_obj = space.int(w_value)
     else:
         if w_base == space.w_None:



More information about the Pypy-commit mailing list