New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Syntax error messages are different from CPython's #2581
Comments
This will also change when we decide to start emulating CPython 3.10, as that version will feature more helpful error messages. |
Hi, is someone picking up this issue? |
Yes, a list of what's left to be changed would be priceless. |
PR #3206 fixed the "invalid syntax" ones. I tried working on the others, but don't know rust so these might be beyond my abilities. |
coolreader18 commentedApr 21, 2021
See e.g. #2570. Some of the unit tests there with "wrong error message" should be somewhat easy to fix - just correct the error message we have to match CPython's. Others might be trickier, since you'll need to add diagnostics to recognize bad syntax and give a more detailed error than "unexpected token". Also, I think around half of them could be fixed just by adding "invalid syntax" in the message for an unexpected token, since they're just checking for "invalid syntax" anywhere in the message (it's just what CPython uses to mean an unexpected token, I think).
The text was updated successfully, but these errors were encountered: