diff options
author | Fredrik Lundh <fredrik@pythonware.com> | 2006-05-26 19:23:21 (GMT) |
---|---|---|
committer | Fredrik Lundh <fredrik@pythonware.com> | 2006-05-26 19:23:21 (GMT) |
commit | a26de2a80fce5070155b3facb126c176988f4513 (patch) | |
tree | 93d5b54ec5171ae15bbd335bab69fad1de65d562 /Lib | |
parent | e001816dff9e12785d4ddbd4f8912ebb099248a1 (diff) | |
download | cpython-a26de2a80fce5070155b3facb126c176988f4513.zip cpython-a26de2a80fce5070155b3facb126c176988f4513.tar.gz cpython-a26de2a80fce5070155b3facb126c176988f4513.tar.bz2 |
added rpartition method to UserString class
Diffstat (limited to 'Lib')
-rwxr-xr-x | Lib/UserString.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/UserString.py b/Lib/UserString.py index b8fd8bf..473ee88 100755 --- a/Lib/UserString.py +++ b/Lib/UserString.py @@ -102,7 +102,8 @@ class UserString: return self.__class__(self.data.ljust(width, *args)) def lower(self): return self.__class__(self.data.lower()) def lstrip(self, chars=None): return self.__class__(self.data.lstrip(chars)) - def partition(self, sep): return self.data.partition(sep) + def partition(self, sep): + return self.data.partition(sep) 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): @@ -111,6 +112,8 @@ class UserString: return self.data.rindex(sub, start, end) def rjust(self, width, *args): return self.__class__(self.data.rjust(width, *args)) + def rpartition(self, sep): + return self.data.rpartition(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) |