(self, include_self=False)
Get all ancestors of this node
Get all ancestors of this node
Get all ancestors of this node
def ancestors(self, include_self=False) -> Generator["BusPath", None, None]:
        """Get all ancestors of this node"""
        parent = self
        while parent is not None:
            if parent != self or include_self:
                yield parent
            parent = parent.parent
def ancestors ( self , include_self = False ) -> Generator [ "BusPath" , None , None ] : parent = self while parent is not None : if parent != self or include_self : yield parent parent = parent . parent