def rindex(self, sub, start=0, end=None):
"""
Like `rfind`, but raises `ValueError` when the substring `sub` is
not found.
See also
--------
char.rindex
"""
return rindex(self, sub, start, end)