[issue5377] Strange behavior when performing int on a Decimal made from -sys.maxint-1

STINNER Victor report at bugs.python.org
Tue Jun 9 01:42:18 CEST 2009


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

> Thanks, Victor

You're welcome :-)

> - I'm getting a test failure in test_class

fixed

> - you should probably be using sys.maxint rather than sys.maxsize

done

> This still doesn't fix the case of int(Fraction(2L))

fixed: Fraction uses __trunc__ rather than __int__.

See updated patch: force_int-4.patch

----------
Added file: http://bugs.python.org/file14240/force_int-4.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5377>
_______________________________________


More information about the Python-bugs-list mailing list