On 3/29/2014 2:56 PM, contact.tri...@gmail.com wrote:
if (a, b) != (None, None):
or
if a != None != b:

Preference? Pros? Cons? Alternatives?

if a is not None is not b
==
if a is not None and None is not b
==
if a is not None and b is not None
which is what I would write if not trying to be cute.
a < x < b is more readable as a chained comparison than the double is not.

--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to