@contextfilter
def do_rejectattr(*args, **kwargs):
 return select_or_reject(args, kwargs, (lambda x: (not x)), True)

@ contextfilter def do_rejectattr ( * args , ** kwargs ) : return select_or_reject ( args , kwargs , ( lambda x : ( not x ) ) , True )
filters a sequence of objects by applying a test to the specified attribute of each object .