diff options
author | Hye-Shik Chang <hyeshik@gmail.com> | 2003-12-15 19:46:09 (GMT) |
---|---|---|
committer | Hye-Shik Chang <hyeshik@gmail.com> | 2003-12-15 19:46:09 (GMT) |
commit | eebb641f236823d45d356aa5834dc453927acf8d (patch) | |
tree | c4ef8997776b08a68c487b0b138d98113ea9e64a | |
parent | c0d49d82de2fc44aa8b690df25e465e202dba40b (diff) | |
download | cpython-eebb641f236823d45d356aa5834dc453927acf8d.zip cpython-eebb641f236823d45d356aa5834dc453927acf8d.tar.gz cpython-eebb641f236823d45d356aa5834dc453927acf8d.tar.bz2 |
Add rsplit method for UserString, too.
(Spotted by Raymond Hettinger)
-rwxr-xr-x | Lib/UserString.py | 2 |
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) |