On Mar 29, 2014, at 6:36 PM, Tim Chase wrote: > And for cases where you have more than one or two things to test for > None-itude, you could use > > if all(x is None for x in [a, b, c, d]): > do_something_if_theyre_all_None()
I might have written that as: if set([a, b, c, d]) == set(None) That's even clearer if you happen to already have the items in an iterable: if set(conditions) == set(None) -- Roy Smith r...@panix.com
-- https://mail.python.org/mailman/listinfo/python-list