[Python-ideas] Make "is" checks on non-singleton literals errors

Serhiy Storchaka storchaka at gmail.com
Tue Oct 9 23:10:06 CEST 2012

On 09.10.12 23:15, Georg Brandl wrote:
> The point is that in 99.9...% of cases,
>    if x == True:
> is just
>    if x:

Of cause. However in Lib/unittest/main.py I found a lot of "if x != 
False:" which is not equivalent to just "if x:". It is equivalent to "if 
x is None or x:" and so I left it as is.

More information about the Python-ideas mailing list