def match_rsequence(self, tokens, item):
        """Matches a reverse sequence."""
        front, series_type, matches = tokens
        self.add_check("_coconut.isinstance(" + item + ", _coconut.abc.Sequence)")
        self.add_check("_coconut.len(" + item + ") >= " + str(len(matches)))
        if front != wildcard:
            if len(matches):
                splice = "[:" + str(-len(matches)) + "]"
            else:
                splice = ""
            self.assign_to_series(front, series_type, item + splice)
        for i, match in enumerate(matches):
            self.match(match, item + "[" + str(i - len(matches)) + "]")
def match_rsequence ( self , tokens , item ) : front , series_type , matches = tokens self . add_check ( "_coconut.isinstance(" + item + ", _coconut.abc.Sequence)" ) self . add_check ( "_coconut.len(" + item + ") >= " + str ( len ( matches ) ) ) if front != wildcard : if len ( matches ) : splice = "[:" + str ( - len ( matches ) ) + "]" else : splice = "" self . assign_to_series ( front , series_type , item + splice ) for i , match in enumerate ( matches ) : self . match ( match , item + "[" + str ( i - len ( matches ) ) + "]" )
Matches a reverse sequence.