(self, group_cls)
return False
Returns ``True`` if this token is within *group_cls*.

        Use this method for example to check if an identifier is within
        a function: ``t.within(sql.Function)``.
Returns ``True`` if this token is within *group_cls*.
Returns True if this token is within * group_cls * .
def within(self, group_cls):
        """Returns ``True`` if this token is within *group_cls*.

        Use this method for example to check if an identifier is within
        a function: ``t.within(sql.Function)``.
        """
        parent = self.parent
        while parent:
            if isinstance(parent, group_cls):
                return True
            parent = parent.parent
        return False
def within ( self , group_cls ) : parent = self . parent while parent : if isinstance ( parent , group_cls ) : return True parent = parent . parent return False