[pypy-commit] pypy default: space.is_true(space.eq(...)) -> space.eq_w(...) in two more places.

mjacob pypy.commits at gmail.com
Thu Mar 2 05:25:56 EST 2017


Author: Manuel Jacob <me at manueljacob.de>
Branch: 
Changeset: r90468:21d6cfb9ce7e
Date: 2017-03-02 11:25 +0100
http://bitbucket.org/pypy/pypy/changeset/21d6cfb9ce7e/

Log:	space.is_true(space.eq(...)) -> space.eq_w(...) in two more places.

diff --git a/pypy/module/_io/interp_textio.py b/pypy/module/_io/interp_textio.py
--- a/pypy/module/_io/interp_textio.py
+++ b/pypy/module/_io/interp_textio.py
@@ -848,7 +848,7 @@
 
         if whence == 1:
             # seek relative to current position
-            if not space.is_true(space.eq(w_pos, space.newint(0))):
+            if not space.eq_w(w_pos, space.newint(0)):
                 raise oefmt(space.w_IOError,
                             "can't do nonzero cur-relative seeks")
             # Seeking to the current position should attempt to sync the
@@ -857,7 +857,7 @@
 
         elif whence == 2:
             # seek relative to end of file
-            if not space.is_true(space.eq(w_pos, space.newint(0))):
+            if not space.eq_w(w_pos, space.newint(0)):
                 raise oefmt(space.w_IOError,
                             "can't do nonzero end-relative seeks")
             space.call_method(self, "flush")
diff --git a/pypy/module/cpyext/sequence.py b/pypy/module/cpyext/sequence.py
--- a/pypy/module/cpyext/sequence.py
+++ b/pypy/module/cpyext/sequence.py
@@ -230,7 +230,7 @@
             if e.match(space, space.w_StopIteration):
                 break
             raise
-        if space.is_true(space.eq(w_next, w_obj)):
+        if space.eq_w(w_next, w_obj):
             return idx
         idx += 1
 


More information about the pypy-commit mailing list