Author: Philip Jenvey <[email protected]>
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
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit