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

hpk at codespeak.net hpk at codespeak.net
Fri Jun 4 11:05:44 CEST 2004


Author: hpk
Date: Fri Jun  4 11:05:43 2004
New Revision: 4898

Modified:
   pypy/branch/src-newobjectmodel/pypy/objspace/std/cpythonobject.py
   pypy/branch/src-newobjectmodel/pypy/objspace/std/default.py
Log:
some more missing NoValue->OperationError ...


Modified: pypy/branch/src-newobjectmodel/pypy/objspace/std/cpythonobject.py
==============================================================================
--- pypy/branch/src-newobjectmodel/pypy/objspace/std/cpythonobject.py	(original)
+++ pypy/branch/src-newobjectmodel/pypy/objspace/std/cpythonobject.py	Fri Jun  4 11:05:43 2004
@@ -298,8 +298,6 @@
         return obj.pypy_next()
     try:
         result = obj.next()
-    except StopIteration:
-        raise NoValue
     except:
         wrap_exception(space)
     return space.wrap(result)

Modified: pypy/branch/src-newobjectmodel/pypy/objspace/std/default.py
==============================================================================
--- pypy/branch/src-newobjectmodel/pypy/objspace/std/default.py	(original)
+++ pypy/branch/src-newobjectmodel/pypy/objspace/std/default.py	Fri Jun  4 11:05:43 2004
@@ -204,7 +204,9 @@
     while 1:
         try:
             w_next = space.next(w_iter)
-        except NoValue:
+        except OperationError, e:
+            if not e.match(space, space.w_StopIteration):
+                raise
             return space.w_False
         if space.is_true(space.eq(w_next, w_lookfor)):
             return space.w_True



More information about the Pypy-commit mailing list