Commits

Philip Jenvey committed a440792

fix: py3 is stricter about len results

  • Participants
  • Parent commits b8e86fd
  • Branches py3k

Comments (0)

Files changed (1)

File pypy/objspace/descroperation.py

 
     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