[Python-checkins] r46397 - python/trunk/Lib/UserString.py

fredrik.lundh python-checkins at python.org
Fri May 26 21:23:22 CEST 2006


Author: fredrik.lundh
Date: Fri May 26 21:23:21 2006
New Revision: 46397

Modified:
   python/trunk/Lib/UserString.py
Log:
added rpartition method to UserString class



Modified: python/trunk/Lib/UserString.py
==============================================================================
--- python/trunk/Lib/UserString.py	(original)
+++ python/trunk/Lib/UserString.py	Fri May 26 21:23:21 2006
@@ -102,7 +102,8 @@
         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 @@
         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)


More information about the Python-checkins mailing list