summaryrefslogtreecommitdiffstats
path: root/Lib/UserString.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2007-12-04 23:02:19 (GMT)
committerChristian Heimes <christian@cheimes.de>2007-12-04 23:02:19 (GMT)
commita37d4c693a024154093b36a612810c3bd72d9254 (patch)
treed8c061b9356d7bf8f444bcfd7869c1ac5bec9f3c /Lib/UserString.py
parent327858ef2c4512937a1333212a3b46a62c18ccc3 (diff)
downloadcpython-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/UserString.py')
-rwxr-xr-xLib/UserString.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/UserString.py b/Lib/UserString.py
index a11717c..a8b805f 100755
--- a/Lib/UserString.py
+++ b/Lib/UserString.py
@@ -85,7 +85,7 @@ class UserString:
def capitalize(self): return self.__class__(self.data.capitalize())
def center(self, width, *args):
return self.__class__(self.data.center(width, *args))
- def count(self, sub, start=0, end=sys.maxint):
+ def count(self, sub, start=0, end=sys.maxsize):
if isinstance(sub, UserString):
sub = sub.data
return self.data.count(sub, start, end)
@@ -105,15 +105,15 @@ class UserString:
return self.__class__(self.data.encode(encoding))
else:
return self.__class__(self.data.encode())
- def endswith(self, suffix, start=0, end=sys.maxint):
+ def endswith(self, suffix, start=0, end=sys.maxsize):
return self.data.endswith(suffix, start, end)
def expandtabs(self, tabsize=8):
return self.__class__(self.data.expandtabs(tabsize))
- def find(self, sub, start=0, end=sys.maxint):
+ def find(self, sub, start=0, end=sys.maxsize):
if isinstance(sub, UserString):
sub = sub.data
return self.data.find(sub, start, end)
- def index(self, sub, start=0, end=sys.maxint):
+ def index(self, sub, start=0, end=sys.maxsize):
return self.data.index(sub, start, end)
def isalpha(self): return self.data.isalpha()
def isalnum(self): return self.data.isalnum()
@@ -137,9 +137,9 @@ class UserString:
if isinstance(new, UserString):
new = new.data
return self.__class__(self.data.replace(old, new, maxsplit))
- def rfind(self, sub, start=0, end=sys.maxint):
+ def rfind(self, sub, start=0, end=sys.maxsize):
return self.data.rfind(sub, start, end)
- def rindex(self, sub, start=0, end=sys.maxint):
+ def rindex(self, sub, start=0, end=sys.maxsize):
return self.data.rindex(sub, start, end)
def rjust(self, width, *args):
return self.__class__(self.data.rjust(width, *args))
@@ -151,7 +151,7 @@ class UserString:
def rsplit(self, sep=None, maxsplit=-1):
return self.data.rsplit(sep, maxsplit)
def splitlines(self, keepends=0): return self.data.splitlines(keepends)
- def startswith(self, prefix, start=0, end=sys.maxint):
+ def startswith(self, prefix, start=0, end=sys.maxsize):
return self.data.startswith(prefix, start, end)
def strip(self, chars=None): return self.__class__(self.data.strip(chars))
def swapcase(self): return self.__class__(self.data.swapcase())