[Python-Dev] Add more SyntaxWarnings?
nas-python at arctrix.com
Thu Jan 24 17:01:26 EST 2019
On 2019-01-24, Terry Reedy wrote:
> Serhiy Storchaka suggested a compiler SyntaxWarning and uploaded a
> proof-of-concept diff that handled the above and many similar cases.
I believe that in general we should give better errors or warnings
if we can do it without huge difficulty. Serhiy's patch is quite
simple. The same check *could* be done by a linting tool. Putting
it in CPython will make it more widely available. These checks
could be helpful to beginners who probably won't have linting tools
I think we should not make it an error, otherwise we have changed
Python "the language". We don't want to force other Python
implementations to do the same check. It might be hard for them to
implement. So, SyntaxWarning seems like a reasonable compromise.
More information about the Python-Dev