In <[EMAIL PROTECTED]>, Bjoern Schliessmann wrote:
> Bruno Desthuilliers wrote:
>> Shawn Milo a écrit :
>
>>> if recs.has_key(piid) is False:
>>
>> 'is' is the identity operator - practically, in CPython, it
>> compares memory addresses. You *dont* want to use it here.
>
> It's recommended to use "is None"; why not "is False"? Are there
> multiple False instances or is False generated somehow?
Before `True` and `False` existed many people defined them as aliases to 1
and 0. And of course there are *many* other objects that can be used in a
boolean context of an ``if`` statement for testing "trueness" and
"falseness".
Ciao,
Marc 'BlackJack' Rintsch
--
http://mail.python.org/mailman/listinfo/python-list