turbosnake/_components.py
def first_matching_descendants(self, predicate) -> Iterable['Component']:
        """Iterator over all descendants of this component that match given predicate but don't have any other such
        components between them and this component.
        """
        for child in self.mounted_children():
            if predicate(child):
                yield child
            else:
                yield from child.first_matching_descendants(predicate)
Iterator over all descendants of this component that match given predicate but don't have any other such
        components between them and this component.
        
Iterator over all descendants of this component that match given predicate but don't have any other such
components between them and this component.
Iterator over all descendants of this component that match given predicate but don ' t have any other such components between them and this component .
def first_matching_descendants(self, predicate) -> Iterable['Component']:
        for child in self.mounted_children():
            if predicate(child):
                yield child
            else:
                yield from child.first_matching_descendants(predicate)
def first_matching_descendants ( self , predicate ) -> Iterable [ 'Component' ] : for child in self . mounted_children ( ) : if predicate ( child ) : yield child else : yield from child . first_matching_descendants ( predicate )
Iterator over all descendants of this component that match given predicate but don't have any other such
components between them and this component.
Iterator over all descendants of this component that match given predicate but don ' t have any other such components between them and this component .
"""Iterator over all descendants of this component that match given predicate but don't have any other such
        components between them and this component.
        """
self
predicate