On 2025-12-29 22:50:41 +1100, Chris Angelico via Python-list wrote: > On Mon, 29 Dec 2025 at 22:47, Peter J. Holzer <[email protected]> wrote: > > As for the error message, I agree that "SyntaxError: invalid syntax" is > > a pretty uninformative message. Python error messages in general have > > become very good over the last few years, so that feels like a bit of a > > throwback. I think it would be generally useful to improve that message > > (maybe something like "expected identfier, got reserved word 'class'"). > > I wouldn't call it a throwback.
Yes, that was perhaps too strong a word. Anachronism? No, that's the
wrong direction.
Point is that we've been spoiled with high quality error messages in the
last few years, so now it's jarring to read a message which would have
been perfectly normal less than 10 years ago.
> Every improvement to the error messages happened because someone wrote
> code to detect a specific category of error and give a more helpful
> message.
Of course. Python doesn't improve itself. There are always people doing
the work. And useful error messages are particularly tricky.
hjp
--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | [email protected] | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"
signature.asc
Description: PGP signature
-- https://mail.python.org/mailman3//lists/python-list.python.org
