[issue5377] Strange behavior when performing int on a Decimal made from -sys.maxint-1
New submission from Gregory Golberg : On some Python builds (2.5.2 and 2.6.1) the following program: import sys from decimal import Decimal def show(n): print type(n) d = Decimal(str(n)) i = int(d) t = type(i) print t i2 = int(i) t2 = type(i2) print t2 n
[issue5377] Strange behavior when performing int on a Decimal made from -sys.maxint-1
Gregory Golberg added the comment: Well, yes, the workaround works, but the question is why would the second int() return an int, if it's indeed a long? And why the difference in this behavior between 2.5.1 and 2.5.2. ___ Python tracker