]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix a bug discovered by Kalle Svensson: comparing sys.maxint to
authorGuido van Rossum <guido@python.org>
Sat, 29 Nov 2003 23:55:09 +0000 (23:55 +0000)
committerGuido van Rossum <guido@python.org>
Sat, 29 Nov 2003 23:55:09 +0000 (23:55 +0000)
2**32-1 makes no sense.  Use 2**31-1 instead.

Lib/test/test_format.py

index 0a512310e82821b653ac8cf9334fcff42865d832..29594475c25339ec3c181a956d93766f01d40ddd 100644 (file)
@@ -230,7 +230,7 @@ test_exc(u'no format', '1', TypeError,
 test_exc(u'no format', u'1', TypeError,
          "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:
     try:
         "%*d"%(sys.maxint, -127)