I’m memorializing here (and also asking) because IMHO , the discussion on the python discord #esoteric-python is ephemeral.
Anyo suggestions for troubleshooting the mapping of error messages to grammar?
…currently the grammar does not disallow yield *() or *() but the compiler (correctly) does disallow.
Yesterday, @encukou and I (well, mostly him) ran into:
First try at disallowing `yield *()` & `del *()` at the grammar level · encukou/cpython@885aaf8 · GitHub
we wanted to add something like a pattern for :
invalid_lone_star_expression:
| a='*' b=bitwise_or { RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, "can't use starred expression here?") }
We’re also struggling to properly match del *() to the right error and I noticed that the checklist ( cpython/InternalDocs/changing_grammar.md at main · python/cpython · GitHub ) doesn’t seem to describe how to troubleshoot the error messages (maybe because they are new…ish ?)