[Python-Dev] Add more SyntaxWarnings?

Nick Coghlan ncoghlan at gmail.com
Sun Jan 27 09:28:25 EST 2019


On Fri, 25 Jan 2019 at 10:15, Eric V. Smith <eric at trueblade.com> wrote:
> It would be a change if the code is never called. I'm not sure we care
> about code that's never called, but it is a change.

The biggest problem with converting runtime errors to compile time
errors is that it means affected dead code goes from being a
readability & maintainability problem to "Python X.Y breaks my
project".

SyntaxWarning splits the difference nicely, since the compiler
complains about the same dead code that would confuse a human reader,
but also ignores it and moves on.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-Dev mailing list