Author jeff.allen
Recipients jeff.allen
Date 2018-04-29.15:05:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
First observed by Helmut Niemann (thanks):

x = int(-(1<<31))
print ('%d' % x) # emits --2147483648

One also observe it as:

>>> int(-(1<<31)).__format__('d')

It's important that x be an int, not a long, which is in fact a clue to the work-around. Clearly this is a thinking error somewhere in int.__format__, so we should add a regression test in case it recurs.
Date User Action Args
2018-04-29 15:05:58jeff.allensetrecipients: + jeff.allen
2018-04-29 15:05:58jeff.allensetmessageid: <>
2018-04-29 15:05:58jeff.allenlinkissue2672 messages
2018-04-29 15:05:57jeff.allencreate