turbosnake/_components.py
def first_matching_ascendant(self, predicate) -> 'Component':
        """Returns closest ascendant of this component that matches given predicate.

        :raises ComponentNotFoundError: when there is no such ascendant
        """
        for asc in self.ascendants():
            if predicate(asc):
                return asc

        raise ComponentNotFoundError()
Returns closest ascendant of this component that matches given predicate.

        :raises ComponentNotFoundError: when there is no such ascendant
        
Returns closest ascendant of this component that matches given predicate.
Returns closest ascendant of this component that matches given predicate .
def first_matching_ascendant(self, predicate) -> 'Component':
        for asc in self.ascendants():
            if predicate(asc):
                return asc
        raise ComponentNotFoundError()
def first_matching_ascendant ( self , predicate ) -> 'Component' : for asc in self . ascendants ( ) : if predicate ( asc ) : return asc raise ComponentNotFoundError ( )
Returns closest ascendant of this component that matches given predicate.
Returns closest ascendant of this component that matches given predicate .
"""Returns closest ascendant of this component that matches given predicate.

        :raises ComponentNotFoundError: when there is no such ascendant
        """
when there is no such ascendant
when there is no such ascendant
ComponentNotFoundError
self
predicate