Is (-1 ==True) True or False? Neither

Oktay Şafak oktaysafak at superonline.com
Sat Jan 24 21:09:06 EST 2009


>> I don't see how fixing this makes harder to treat True and False as
>> first-class objects. If doing the right thing takes some special casing
>> then be it, but I don't think it's so.
> 
> True in ['something', False]
> 
> In your semantics, this would evaluate to True because ('something' == 
> True) is True.
> 

No, it wouldn't. We are talking about integer-boolean equality 
comparisons, not boolean-string ones. But I get your point.





More information about the Python-list mailing list