]> granicus.if.org Git - python/commitdiff
Add "partition" to UserString.
authorGeorg Brandl <georg@python.org>
Fri, 26 May 2006 11:26:11 +0000 (11:26 +0000)
committerGeorg Brandl <georg@python.org>
Fri, 26 May 2006 11:26:11 +0000 (11:26 +0000)
Lib/UserString.py

index 94eb66d4542b03d02821b9c1c9606e8c58b722b3..b8fd8bf6355362069f0ef22ca4cd5987beba4ba6 100755 (executable)
@@ -102,6 +102,7 @@ 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 replace(self, old, new, maxsplit=-1):
         return self.__class__(self.data.replace(old, new, maxsplit))
     def rfind(self, sub, start=0, end=sys.maxint):