Commit 457bf91a authored by Guido van Rossum's avatar Guido van Rossum

Fix a bug discovered by Kalle Svensson: comparing sys.maxint to

2**32-1 makes no sense.  Use 2**31-1 instead.
parent 6c9e1305
...@@ -230,7 +230,7 @@ test_exc(u'no format', '1', TypeError, ...@@ -230,7 +230,7 @@ test_exc(u'no format', '1', TypeError,
test_exc(u'no format', u'1', TypeError, test_exc(u'no format', u'1', TypeError,
"not all arguments converted during string formatting") "not all arguments converted during string formatting")
if sys.maxint == 2**32-1: if sys.maxint == 2**31-1:
# crashes 2.2.1 and earlier: # crashes 2.2.1 and earlier:
try: try:
"%*d"%(sys.maxint, -127) "%*d"%(sys.maxint, -127)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment