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

Serhiy Storchaka storchaka at gmail.com
Tue Oct 9 00:42:24 CEST 2012


On 08.10.12 22:44, Mike Graham wrote:
> There are no cases where
>
>      if x is "foo":

I see such code in docutils (Doc/tools/docutils/writers/latex2e/__init__.py)

> or
>
>     if x is 4:

and in tests (Lib/test/test_long.py, Lib/test/test_int.py, 
Lib/test/test_grammar.py, Lib/test/test_winsound.py).





More information about the Python-ideas mailing list