steambird/models/coursetree.py
def all_parents(self) -> List['Period']:
        """
        Method which returns all parents of a Period. Recursively adds until there is no further
         child object to be found

        :return: List of Periods that are parents of requested period
        """
        result = []
        parent = self.parent()
        if parent:
            result.append(parent)
            result += parent.all_parents()
        return result

        Method which returns all parents of a Period. Recursively adds until there is no further
         child object to be found

        :return: List of Periods that are parents of requested period
        
Method which returns all parents of a Period. Recursively adds until there is no further
child object to be found
Method which returns all parents of a Period . Recursively adds until there is no further child object to be found
def all_parents(self) -> List['Period']:
        result = []
        parent = self.parent()
        if parent:
            result.append(parent)
            result += parent.all_parents()
        return result
def all_parents ( self ) -> List [ 'Period' ] : result = [ ] parent = self . parent ( ) if parent : result . append ( parent ) result += parent . all_parents ( ) return result
Method which returns all parents of a Period.
Method which returns all parents of a Period .
"""
        Method which returns all parents of a Period. Recursively adds until there is no further
         child object to be found

        :return: List of Periods that are parents of requested period
        """
List of Periods that are parents of requested period
List of Periods that are parents of requested period
self