soupy.py
def takewhile(self, func=None):
        """
        Return a new Collection with the last few items removed.

        Parameters:

            func : function(Node) -> Node

        Returns:

            A new Collection, discarding all items
            at and after the first item where bool(func(item)) == False

        Examples:

            node.find_all('tr').takewhile(Q.find_all('td').count() > 3)

        """
        func = _make_callable(func)
        return Collection(takewhile(func, self._items))
def takewhile(self, func=None):
        func = _make_callable(func)
        return Collection(takewhile(func, self._items))
def takewhile ( self , func = None ) : func = _make_callable ( func ) return Collection ( takewhile ( func , self . _items ) )
Return a new Collection with the last few items removed.

        Parameters:

            func : function(Node) -> Node

        Returns:

            A new Collection, discarding all items
            at and after the first item where bool(func(item)) == False

        Examples:

            node.find_all('tr').takewhile(Q.find_all('td').count() > 3)
Return a new Collection with the last few items removed .