'is not' or '!='
ElChino
elchino at cnn.cn
Mon Aug 18 16:58:34 EDT 2014
"Marko Rauhamaa" <marko at pacujo.net> wrote:
> In almost all cases, both tests would result in the same behavior.
> However, the "is not" test is conceptually the correct one since you
> want to know if x is the one and only None object. You don't want to be
> fooled by an imposter object that simply looks like the None object.
Thanks for this excellent answer. "Terve, terve".
More information about the Python-list
mailing list