]> granicus.if.org Git - python/commitdiff
added rpartition method to UserString class
authorFredrik Lundh <fredrik@pythonware.com>
Fri, 26 May 2006 19:23:21 +0000 (19:23 +0000)
committerFredrik Lundh <fredrik@pythonware.com>
Fri, 26 May 2006 19:23:21 +0000 (19:23 +0000)
Lib/UserString.py

index b8fd8bf6355362069f0ef22ca4cd5987beba4ba6..473ee882d189248b69559dd17b7ac69521809894 100755 (executable)
@@ -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)