diff options
author | Christian Heimes <christian@cheimes.de> | 2007-12-04 23:02:19 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2007-12-04 23:02:19 (GMT) |
commit | a37d4c693a024154093b36a612810c3bd72d9254 (patch) | |
tree | d8c061b9356d7bf8f444bcfd7869c1ac5bec9f3c /Lib/test/test_grammar.py | |
parent | 327858ef2c4512937a1333212a3b46a62c18ccc3 (diff) | |
download | cpython-a37d4c693a024154093b36a612810c3bd72d9254.zip cpython-a37d4c693a024154093b36a612810c3bd72d9254.tar.gz cpython-a37d4c693a024154093b36a612810c3bd72d9254.tar.bz2 |
Removed PyInt_GetMax and sys.maxint
I replaced sys.maxint with sys.maxsize in Lib/*.py. Does anybody see a problem with the change on Win 64bit platforms? Win 64's long is just 32bit but the sys.maxsize is now 2**63-1 on every 64bit platform.
Also added docs for sys.maxsize.
Diffstat (limited to 'Lib/test/test_grammar.py')
-rw-r--r-- | Lib/test/test_grammar.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_grammar.py b/Lib/test/test_grammar.py index ee3ffc7..7ab7557 100644 --- a/Lib/test/test_grammar.py +++ b/Lib/test/test_grammar.py @@ -32,8 +32,8 @@ class TokenTests(unittest.TestCase): self.assertEquals(0o377, 255) self.assertEquals(2147483647, 0o17777777777) self.assertEquals(0b1001, 9) - from sys import maxint - if maxint == 2147483647: + from sys import maxsize + if maxsize == 2147483647: self.assertEquals(-2147483647-1, -0o20000000000) # XXX -2147483648 self.assert_(0o37777777777 > 0) @@ -45,7 +45,7 @@ class TokenTests(unittest.TestCase): x = eval(s) except OverflowError: self.fail("OverflowError on huge integer literal %r" % s) - elif maxint == 9223372036854775807: + elif maxsize == 9223372036854775807: self.assertEquals(-9223372036854775807-1, -0o1000000000000000000000) self.assert_(0o1777777777777777777777 > 0) self.assert_(0xffffffffffffffff > 0) @@ -58,7 +58,7 @@ class TokenTests(unittest.TestCase): except OverflowError: self.fail("OverflowError on huge integer literal %r" % s) else: - self.fail('Weird maxint value %r' % maxint) + self.fail('Weird maxsize value %r' % maxsize) def testLongIntegers(self): x = 0 |