Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
gh-127303: Add docs for token.EXACT_TOKEN_TYPES#127304
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
ghost commentedNov 26, 2024 • edited by ghost
Loading Uh oh!
There was an error while loading.Please reload this page.
edited by ghost
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM. Ilya and I checked that it was added in version 3.8. Although I'm a bit unsure about the wording, I think it could be improved, but neither I nor Ilya are native English speakers :(
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
terryjreedy left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Now that it is documented, EXACT_TOKEN_TYPES needs to be added to__all__ at the top of token.py. In particular, line 4, which should then be wrapped to 2 lines.
__all__ = ['tok_name', 'ISTERMINAL', 'ISNONTERMINAL', 'ISEOF', 'EXACT_TOKEN_TYPES']EDIT: The complication is that token.py is auto-generated by Tools/build/generate_token.py, so it is the latter that needs revision. In particular, expand line 229 of that file to 2 lines.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
I have made the requested changes; please review again |
Thanks for making the requested changes! @terryjreedy,@Eclips4: please review the changes made to this pull request. |
picnixz left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
While the attribute already existed its scope was not specifically public. Now we can really stress that it's public and documented.
| A dictionary mapping the string representation of a token to its numeric code. | ||
| ..versionadded::3.8 | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Can we have two blank lines here? (as above)
Uh oh!
There was an error while loading.Please reload this page.
Misc/NEWS.d/next/Library/2024-11-27-16-06-10.gh-issue-127303.asqkgh.rst OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
…sqkgh.rstCo-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM.
dd3a87d intopython:mainUh oh!
There was an error while loading.Please reload this page.
Thanks@lubaskinc0de for the PR, and@terryjreedy for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
---------(cherry picked from commitdd3a87d)Co-authored-by: Илья Любавский <100635212+lubaskinc0de@users.noreply.github.com>Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>Co-authored-by: Tomas R. <tomas.roun8@gmail.com>Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
GH-127390 is a backport of this pull request to the3.13 branch. |
---------(cherry picked from commitdd3a87d)Co-authored-by: Илья Любавский <100635212+lubaskinc0de@users.noreply.github.com>Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>Co-authored-by: Tomas R. <tomas.roun8@gmail.com>Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
GH-127391 is a backport of this pull request to the3.12 branch. |
…127391)gh-127303: Add docs for token.EXACT_TOKEN_TYPES (GH-127304)---------(cherry picked from commitdd3a87d)Co-authored-by: Илья Любавский <100635212+lubaskinc0de@users.noreply.github.com>Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>Co-authored-by: Tomas R. <tomas.roun8@gmail.com>Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
…127390)gh-127303: Add docs for token.EXACT_TOKEN_TYPES (GH-127304)---------(cherry picked from commitdd3a87d)Co-authored-by: Илья Любавский <100635212+lubaskinc0de@users.noreply.github.com>Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>Co-authored-by: Tomas R. <tomas.roun8@gmail.com>Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
bedevere-bot commentedNov 30, 2024
|
---------Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>Co-authored-by: Tomas R. <tomas.roun8@gmail.com>Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
---------Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>Co-authored-by: Tomas R. <tomas.roun8@gmail.com>Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Uh oh!
There was an error while loading.Please reload this page.
token.EXACT_TOKEN_TYPES#127303📚 Documentation preview 📚:https://cpython-previews--127304.org.readthedocs.build/