
March 27, 2011
12:46 p.m.
Jan Kaliszewski <zuo@chopin.edu.pl> writes:
Which one of the following do you prefer?
* filter((lambda x: x is None), iterable) * filter(functools.partial(operator.is_, None), iterable) * filter(None, (x is None for x in iterable)) * filter(operator.is_none, iterable)
(x for x in iterable if x is None) -- \ “The Way to see by Faith is to shut the Eye of Reason.” | `\ —Benjamin Franklin | _o__) | Ben Finney