From: Guido van Rossum Date: Sat, 29 Nov 2003 23:55:09 +0000 (+0000) Subject: Fix a bug discovered by Kalle Svensson: comparing sys.maxint to X-Git-Tag: v2.4a1~1188 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=457bf91a7fb1ab628a94fe740450f137b4ee1b92;p=thirdparty%2FPython%2Fcpython.git Fix a bug discovered by Kalle Svensson: comparing sys.maxint to 2**32-1 makes no sense. Use 2**31-1 instead. --- diff --git a/Lib/test/test_format.py b/Lib/test/test_format.py index 0a512310e828..29594475c253 100644 --- a/Lib/test/test_format.py +++ b/Lib/test/test_format.py @@ -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)