[issue34850] Emit a syntax warning for "is" with a literal

Nathaniel Smith report at bugs.python.org
Fri Nov 30 20:45:00 EST 2018


Nathaniel Smith <njs at pobox.com> added the comment:

> In my experience people are more likely to run code through a linter than they are to ever run an interpreter with DeprecationWarning enabled.

This used to be true, and it was a disaster. So there's been a lot of work to fix it, and it's not true anymore.

Starting in 3.7, the built-in REPL has DeprecationWarning enabled by default, as do all standalone scripts (see PEP 565).

IPython/Jupyter has enabled DeprecationWarning by default for interactive code for about 3 years now: https://github.com/ipython/ipython/issues/8478

pytest started showing DeprecationWarnings by default a few months ago, and unittest has done so for ages.

I don't think I've ever met someone who skipped straight to linting, without ever having used a REPL, or written a script, or written a test :-)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34850>
_______________________________________


More information about the Python-bugs-list mailing list