[issue5377] Strange behavior when performing int on a Decimal made from -sys.maxint-1
STINNER Victor
report at bugs.python.org
Sat Feb 28 15:42:04 CET 2009
STINNER Victor <victor.stinner at haypocalc.com> added the comment:
@tjreedy: Do you expect conversion to small int if __int__() result
fits in a small int?
----
class A:
def __int__(self):
return 1L
x=int(A())
print repr(x), type(x)
----
Result with Python 2.5.1: 1L <type 'long'>
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5377>
_______________________________________
More information about the Python-bugs-list
mailing list