On 03/29/2014 02:01 PM, Johannes Bauer wrote:
On 29.03.2014 20:05, Steven D'Aprano wrote:
On Sat, 29 Mar 2014 11:56:50 -0700, contact.trigon wrote:
if (a, b) != (None, None):
or
if a != None != b:
Preference? Pros? Cons? Alternatives?
if not (a is b is None): ...
Or if you prefer:
if a is not b is not None: ...
Is this an obfuscated coding contest? Why do you opt for a solution that
one has to at least think 2 seconds about when the simplest solution:
if (a is not None) or (b is not None):
is immediately understandable by everyone?
+1
--
~Ethan~
--
https://mail.python.org/mailman/listinfo/python-list