What is the most efficient way to test for False in a list?

Bruno Desthuilliers bruno.42.desthuilliers at wtf.websiteburo.oops.com
Wed Jul 11 06:57:33 EDT 2007


Paul Rubin a écrit :
> Duncan Booth <duncan.booth at invalid.invalid> writes:
>>>   status = not (False in list)
>> That is an equality test, not an identity test:
>>
>>>>> False in [0]
>> True
> 
> Arrggggh!  Strongly typed language, my eye ;-)  Thanks.

We're quite a few to still think that the introduction of a boolean type 
in Python was perhaps not such a great idea.



More information about the Python-list mailing list