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.
diff --git a/Lib/test/test_types.py b/Lib/test/test_types.py
index 70c281f..0014323 100644
--- a/Lib/test/test_types.py
+++ b/Lib/test/test_types.py
@@ -105,7 +105,7 @@
if not (xsize*ysize*zsize == zsize*xsize*ysize == 338912):
self.fail('int mul commutativity')
# And another.
- m = -sys.maxint - 1
+ m = -sys.maxsize - 1
for divisor in 1, 2, 4, 8, 16, 32:
j = m // divisor
prod = divisor * j
@@ -122,7 +122,7 @@
self.fail("expected type(%r) to be long, not %r" %
(prod, type(prod)))
# Check for expected * overflow to long.
- m = sys.maxint
+ m = sys.maxsize
for divisor in 1, 2, 4, 8, 16, 32:
j = m // divisor + 1
prod = divisor * j
@@ -137,7 +137,7 @@
if (-12) + (-24) != -36: self.fail('long op')
if not 12 < 24: self.fail('long op')
if not -24 < -12: self.fail('long op')
- x = sys.maxint
+ x = sys.maxsize
if int(int(x)) != x: self.fail('long op')
try: y = int(int(x)+1)
except OverflowError: self.fail('long op')