(self, other)
return False
Returns ``True`` if *other* is in this tokens ancestry.
Returns ``True`` if *other* is in this tokens ancestry.
Returns True if * other * is in this tokens ancestry .
def has_ancestor(self, other):
        """Returns ``True`` if *other* is in this tokens ancestry."""
        parent = self.parent
        while parent:
            if parent == other:
                return True
            parent = parent.parent
        return False
def has_ancestor ( self , other ) : parent = self . parent while parent : if parent == other : return True parent = parent . parent return False