(self, idx, clss)
return None
Returns the next token matching a class.

        *idx* is where to start searching in the list of child tokens.
        *clss* is a list of classes the token should be an instance of.

        If no matching token can be found ``None`` is returned.
Returns the next token matching a class.
Returns the next token matching a class .
def token_next_by_instance(self, idx, clss):
        """Returns the next token matching a class.

        *idx* is where to start searching in the list of child tokens.
        *clss* is a list of classes the token should be an instance of.

        If no matching token can be found ``None`` is returned.
        """
        if isinstance(clss, (list, tuple)):
            clss = (clss,)
        if isinstance(clss, tuple):
            clss = tuple(clss)
        for token in self.tokens[idx:]:
            if isinstance(token, clss):
                return token
        return None
def token_next_by_instance ( self , idx , clss ) : if isinstance ( clss , ( list , tuple ) ) : clss = ( clss , ) if isinstance ( clss , tuple ) : clss = tuple ( clss ) for token in self . tokens [ idx : ] : if isinstance ( token , clss ) : return token return None