comparison with None
Steven D'Aprano
steve at REMOVE.THIS.cybersource.com.au
Thu Apr 19 10:22:09 EDT 2007
On Thu, 19 Apr 2007 08:18:30 -0400, Steve Holden wrote:
>> Which is why I suggested using the explicit type(x) == types.NoneType as
>> opposed to
>> x is None
>>
>>
> This seems to go entirely against the spirit of the language. It's about
> as sensible as writing
>
> (3 > 4) == True
Please! For extra certainty, you should write that as:
((int(3) > int(4)) == True) == True
Explicit is better than sensible, yes?
*wink*
--
Steven.
More information about the Python-list
mailing list