Author: Yannick Jadoul <[email protected]>
Branch: py3.7-bpo-29839
Changeset: r97821:25e4f3f9050d
Date: 2019-10-19 20:29 +0200
http://bitbucket.org/pypy/pypy/changeset/25e4f3f9050d/

Log:    Fix translation by avoiding space.unwrap

diff --git a/pypy/objspace/descroperation.py b/pypy/objspace/descroperation.py
--- a/pypy/objspace/descroperation.py
+++ b/pypy/objspace/descroperation.py
@@ -269,7 +269,7 @@
         # Will complain if result is too big.
         w_result = space.index(w_obj)
         assert space.isinstance_w(w_result, space.w_int)
-        if space.unwrap(w_result) < 0:
+        if space.is_true(space.lt(w_result, space.newint(0))):
             raise oefmt(space.w_ValueError, "__len__() should return >= 0")
         result = space.getindex_w(w_result, space.w_OverflowError)
         assert result >= 0
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to