parameters: (items, *args, **kwargs)
return_statement: return (item for item in items if pred(item))
docstring: Filters an iterable using lookup parameters
  
      :param items  : iterable
      :param args   : ``Q`` objects
      :param kwargs : lookup parameters
      :rtype        : lazy iterable (generator)
docstring_summary: Filters an iterable using lookup parameters
docstring_tokens: Filters an iterable using lookup parameters
function: def filter_items(items, *args, **kwargs):
      """Filters an iterable using lookup parameters
  
      :param items  : iterable
      :param args   : ``Q`` objects
      :param kwargs : lookup parameters
      :rtype        : lazy iterable (generator)
  
      """
      q1 = list(args) if args is not None else []
      q2 = [Q(**kwargs)] if kwargs is not None else []
      lookup_groups = q1 + q2
      pred = lambda item: all(lg.evaluate(item) for lg in lookup_groups)
      return (item for item in items if pred(item))
function_tokens: def filter_items ( items , * args , * * kwargs ) : q1 = list ( args ) if args is not None else [ ] q2 = [ Q ( * * kwargs ) ] if kwargs is not None else [ ] lookup_groups = q1 + q2 pred = lambda item : all ( lg . evaluate ( item ) for lg in lookup_groups ) return ( item for item in items if pred ( item ) )