Syntax error messages are different from CPython's #2581
Labels
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. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: