[pypy-commit] pypy int_w-refactor: another case in which allow_conversion=False is semantically right, although the non-int cases are already caught before

antocuni noreply at buildbot.pypy.org
Wed Feb 26 11:26:03 CET 2014


Author: Antonio Cuni <anto.cuni at gmail.com>
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))


More information about the pypy-commit mailing list