From eebb641f236823d45d356aa5834dc453927acf8d Mon Sep 17 00:00:00 2001 From: Hye-Shik Chang Date: Mon, 15 Dec 2003 19:46:09 +0000 Subject: [PATCH] Add rsplit method for UserString, too. (Spotted by Raymond Hettinger) --- Lib/UserString.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/UserString.py b/Lib/UserString.py index f28e54c4410..e8e0fedd87f 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)