[pypy-commit] pypy py3k: fix: py3 is stricter about len results
pjenvey
noreply at buildbot.pypy.org
Fri Mar 7 03:36:19 CET 2014
Author: Philip Jenvey <pjenvey at underboss.org>
Branch: py3k
Changeset: r69772:a44079249698
Date: 2014-03-06 18:34 -0800
http://bitbucket.org/pypy/pypy/changeset/a44079249698/
Log: fix: py3 is stricter about len results
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 @@
def _check_len_result(space, w_obj):
# Will complain if result is too big.
- result = space.int_w(w_obj)
+ result = space.int_w(w_obj, allow_conversion=False)
if result < 0:
raise oefmt(space.w_ValueError, "__len__() should return >= 0")
return result
More information about the pypy-commit
mailing list