[Python-ideas] Programming recommendations (PEP 8) and boolean values

Guido van Rossum guido at python.org
Thu Aug 9 16:33:13 CEST 2012


They're both equally bad IMO.

On Thursday, August 9, 2012, Antoine Pitrou wrote:

> Le 08/08/2012 16:28, Guido van Rossum a écrit :
>
>> I'd be strongly against changing that rule. If you don't want other
>> types than bool, use an isinstance check. Code using "is True" is most
>> likely a bug. (It's different for None, since that has no second value
>> that is assumed.)
>>
>
> That said, I'm also curious about the answer to Michael's following
> question:
> “why does it say that using an identity check is worse than an equality
> check?”
>
> Regards
>
> Antoine.
>
>
> ______________________________**_________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/**mailman/listinfo/python-ideas<http://mail.python.org/mailman/listinfo/python-ideas>
>


-- 
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20120809/5db9d369/attachment.html>


More information about the Python-ideas mailing list