[prev in list] [next in list] [prev in thread] [next in thread]
List: python-list
Subject: Re: checking if two things do not equal None
From: Jeremy Sanders <jeremy () jeremysanders ! net>
Date: 2014-03-31 7:56:59
Message-ID: lhb73s$l9l$1 () ger ! gmane ! org
[Download RAW message or body]
contact.trigon@gmail.com wrote:
> if (a, b) != (None, None):
> or
> if a != None != b:
>
> Preference? Pros? Cons? Alternatives?
I couldn't see anyone else give this, but I like
if None not in (a, b):
pass
Jeremy
--
https://mail.python.org/mailman/listinfo/python-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic