easy question on parsing python: "is not None"

Bruno Desthuilliers bruno.42.desthuilliers at websiteburo.invalid
Fri Aug 6 03:25:37 EDT 2010


Roald de Vries a écrit :
> 
> 'not None' first casts None to a bool, and then applies 'not', so 'x is 
> not None' means 'x is True'.

Obviously plain wrong :

Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> 42 is not None
True
 >>> 42 is True
False
 >>>

Please check your facts before posting !-)



More information about the Python-list mailing list