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
Auto-generate Lib/keyword.py #80324
Comments
The stdib keyword.py module must be regenerated after adding/removing keywords from the grammar. While this is rare, we now generate everything else derived from the grammar. Hopefully someone can add some rules to the Makefile to auto-generate this one too when regen-grammar is run. This is probably an easy project for a beginning contributor. |
Lib/keyword.py already regenerates itself from Python/graminit.c when run as a script, but there should be a See also bpo-30638. |
I am working on this. Shouldn't there be a PR by tomorrow from me. Someone else can take it on. |
Do not haste with this. After implementing pgen in Python, Lib/keyword.py can be generated directly by pgen. |
Noted. Releasing this in favor of when pgen is implemented in Python to solve this. |
A similar thing seems to be the list of keywords in Lib/pydoc.py. The recipe says
|
(However that doesn't seem to work. Anyway, there's a list of all keywords there.) |
Hum, it seems the right solution was to arrange for async and await to appear in the list of keywords despite their special status. Nevertheless in theory there's something that can be done here to auto-regenerate the list derived from the Grammar. |
That's bpo-35808 and PR 11814 which is under review. Anyway, at the end, it would be nice if Lib/keyword.py would be regenerated by "make regen-all". Currently, "regen-all" doesn't regenerate everything. For example, configure is not regenerated. |
New changeset 91759d9 by Pablo Galindo in branch 'master': |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: