def rindex(self, sub, start=None, end=None):
        """Like .rfind() but raise ValueError when the substring is not found.

        :param str sub: Substring to search.
        :param int start: Beginning position.
        :param int end: Stop comparison at this position.
        """
        return self.value_no_colors.rindex(sub, start, end)
def rindex ( self , sub , start = None , end = None ) : return self . value_no_colors . rindex ( sub , start , end )
Like .rfind() but raise ValueError when the substring is not found.

        :param str sub: Substring to search.
        :param int start: Beginning position.
        :param int end: Stop comparison at this position.