checking if two things do not equal None

Moritz Emanuel Beber moritz.beber at gmail.com
Mon Mar 31 15:22:24 EDT 2014


On 31/03/14 19:28, Abe wrote:
>> I couldn't see anyone else give this, but I like
>> if None not in (a, b):
> I did.
>
>> I am now considering:
>> if None not in (a,b):
>> or
>> if (a is not None) and (b is not None):
That's just

if not (a is None or b is None):

but you seem to have found your way.
> However, I decided to just turn the two parameters into one (sequence), since they were logically grouped anyhow.
>
>




More information about the Python-list mailing list