summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHye-Shik Chang <hyeshik@gmail.com>2003-12-15 19:46:09 (GMT)
committerHye-Shik Chang <hyeshik@gmail.com>2003-12-15 19:46:09 (GMT)
commiteebb641f236823d45d356aa5834dc453927acf8d (patch)
treec4ef8997776b08a68c487b0b138d98113ea9e64a
parentc0d49d82de2fc44aa8b690df25e465e202dba40b (diff)
downloadcpython-eebb641f236823d45d356aa5834dc453927acf8d.zip
cpython-eebb641f236823d45d356aa5834dc453927acf8d.tar.gz
cpython-eebb641f236823d45d356aa5834dc453927acf8d.tar.bz2
Add rsplit method for UserString, too.
(Spotted by Raymond Hettinger)
-rwxr-xr-xLib/UserString.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/UserString.py b/Lib/UserString.py
index f28e54c..e8e0fed 100755
--- a/Lib/UserString.py
+++ b/Lib/UserString.py
@@ -113,6 +113,8 @@ class UserString:
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 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):
return self.data.startswith(prefix, start, end)