Author: Antonio Cuni <[email protected]>
Branch: int_w-refactor
Changeset: r69460:464d1fe86d91
Date: 2014-02-26 11:23 +0100
http://bitbucket.org/pypy/pypy/changeset/464d1fe86d91/

Log:    another case in which allow_conversion=False is semantically right,
        although the non-int cases are already caught before

diff --git a/pypy/objspace/std/intobject.py b/pypy/objspace/std/intobject.py
--- a/pypy/objspace/std/intobject.py
+++ b/pypy/objspace/std/intobject.py
@@ -671,7 +671,7 @@
             # int_w is effectively what we want in this case,
             # we cannot construct a subclass of int instance with an
             # an overflowing long
-            value = space.int_w(w_obj)
+            value = space.int_w(w_obj, allow_conversion=False)
         elif space.isinstance_w(w_value, space.w_str):
             value, w_longval = _string_to_int_or_long(space, w_value,
                                                       space.str_w(w_value))
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to