summaryrefslogtreecommitdiffstats
path: root/Lib/UserString.py
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2003-04-10 22:35:32 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2003-04-10 22:35:32 (GMT)
commitffe33b7f2416132d2e5b64683dbcc2aaf0596937 (patch)
treeba66fc78e483c14dc34b86a8f079d5b37268f03d /Lib/UserString.py
parent5c16c7b014f4cf975d25f667f6309933415e130d (diff)
downloadcpython-ffe33b7f2416132d2e5b64683dbcc2aaf0596937.zip
cpython-ffe33b7f2416132d2e5b64683dbcc2aaf0596937.tar.gz
cpython-ffe33b7f2416132d2e5b64683dbcc2aaf0596937.tar.bz2
Attempt to make all the various string *strip methods the same.
* Doc - add doc for when functions were added * UserString * string object methods * string module functions 'chars' is used for the last parameter everywhere. These changes will be backported, since part of the changes have already been made, but they were inconsistent.
Diffstat (limited to 'Lib/UserString.py')
-rwxr-xr-xLib/UserString.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/UserString.py b/Lib/UserString.py
index 2819ab0..fcd115d 100755
--- a/Lib/UserString.py
+++ b/Lib/UserString.py
@@ -99,7 +99,7 @@ class UserString:
def join(self, seq): return self.data.join(seq)
def ljust(self, width): return self.__class__(self.data.ljust(width))
def lower(self): return self.__class__(self.data.lower())
- def lstrip(self, sep=None): return self.__class__(self.data.lstrip(sep))
+ def lstrip(self, chars=None): return self.__class__(self.data.lstrip(chars))
def replace(self, old, new, maxsplit=-1):
return self.__class__(self.data.replace(old, new, maxsplit))
def rfind(self, sub, start=0, end=sys.maxint):
@@ -107,13 +107,13 @@ class UserString:
def rindex(self, sub, start=0, end=sys.maxint):
return self.data.rindex(sub, start, end)
def rjust(self, width): return self.__class__(self.data.rjust(width))
- def rstrip(self, sep=None): return self.__class__(self.data.rstrip(sep))
+ def rstrip(self, chars=None): return self.__class__(self.data.rstrip(chars))
def split(self, sep=None, maxsplit=-1):
return self.data.split(sep, maxsplit)
def splitlines(self, keepends=0): return self.data.splitlines(keepends)
def startswith(self, prefix, start=0, end=sys.maxint):
return self.data.startswith(prefix, start, end)
- def strip(self, sep=None): return self.__class__(self.data.strip(sep))
+ def strip(self, chars=None): return self.__class__(self.data.strip(chars))
def swapcase(self): return self.__class__(self.data.swapcase())
def title(self): return self.__class__(self.data.title())
def translate(self, *args):