[Python-Dev] Add more SyntaxWarnings?

Nick Coghlan ncoghlan at gmail.com
Tue Jan 29 08:44:57 EST 2019

On Tue, 29 Jan 2019 at 14:47, Stephen J. Turnbull
<turnbull.stephen.fw at u.tsukuba.ac.jp> wrote:
> I don't disagree.  I disagree with the conclusion that it's worth the
> effort to try to improve all error messages that confuse new users,
> because new users (by definition) don't know enough to respond
> usefully in many cases.  In those cases, they need to be told what's
> going on and why, where more experienced users can figure it out from
> their background knowledge of Python semantics.  Embedding a "theory
> of operations" note in every error message would be possible, but I
> don't think it's a good idea -- it would certainly make the language
> more annoying for experienced developers.

FWIW, we have pretty decent evidence that error messages don't have to
provide a wonderful explanation on their own in order to be helpful:
they just need to be distinctive enough that a web search will
reliably get you to a page that gives you relevant information.

Pre-seeded answers on Stack Overflow are excellent for handling the
second half of that approach (see [1] for a specific example).


[1] https://stackoverflow.com/questions/25445439/what-does-syntaxerror-missing-parentheses-in-call-to-print-mean-in-python

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

More information about the Python-Dev mailing list