diff options
Diffstat (limited to 'Lib/collections.py')
-rw-r--r-- | Lib/collections.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/collections.py b/Lib/collections.py index f255919..3e01054 100644 --- a/Lib/collections.py +++ b/Lib/collections.py @@ -767,6 +767,8 @@ class UserString(Sequence): new = new.data return self.__class__(self.data.replace(old, new, maxsplit)) def rfind(self, sub, start=0, end=_sys.maxsize): + if isinstance(sub, UserString): + sub = sub.data return self.data.rfind(sub, start, end) def rindex(self, sub, start=0, end=_sys.maxsize): return self.data.rindex(sub, start, end) |