Skip to content

Document "!" token in lexical analysis document #123579

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

Closed
Glyphack opened this issue Sep 1, 2024 · 3 comments
Closed

Document "!" token in lexical analysis document #123579

Glyphack opened this issue Sep 1, 2024 · 3 comments
Labels
docs Documentation in the Doc dir topic-parser

Comments

@Glyphack
Copy link
Contributor

Glyphack commented Sep 1, 2024

Documentation

I think after PEP701 The ! character became a token.
But this is not listed like other tokens:

It is mentioned in the grammar though: https://docs.python.org/3/reference/lexical_analysis.html#formatted-string-literals

I think it would be helpful to list it in https://docs.python.org/3/reference/lexical_analysis.html or remove the rest of tokens and refer to Grammar/Tokens file so the list is always up to date.

Linked PRs

@Glyphack Glyphack added the docs Documentation in the Doc dir label Sep 1, 2024
@lysnikolaou
Copy link
Member

Thanks for opening an issue @Glyphack! That's a good point. Would you like to submit a PR that adds ! to the list of operators in https://docs.python.org/3/reference/lexical_analysis.html#operators?

@Glyphack
Copy link
Contributor Author

Glyphack commented Sep 2, 2024

Yess I will do thanks for clarifying.

Glyphack added a commit to Glyphack/cpython that referenced this issue Sep 2, 2024
Glyphack added a commit to Glyphack/cpython that referenced this issue Sep 2, 2024
Glyphack added a commit to Glyphack/cpython that referenced this issue Sep 2, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Sep 3, 2024
(cherry picked from commit 68fe575)

Co-authored-by: Shaygan Hooshyari <sh.hooshyari@gmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Sep 3, 2024
(cherry picked from commit 68fe575)

Co-authored-by: Shaygan Hooshyari <sh.hooshyari@gmail.com>
lysnikolaou pushed a commit that referenced this issue Sep 3, 2024
(cherry picked from commit 68fe575)

Co-authored-by: Shaygan Hooshyari <sh.hooshyari@gmail.com>
lysnikolaou pushed a commit that referenced this issue Sep 3, 2024
(cherry picked from commit 68fe575)

Co-authored-by: Shaygan Hooshyari <sh.hooshyari@gmail.com>
@lysnikolaou
Copy link
Member

Fixed in #123612. Thanks @Glyphack!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir topic-parser
Projects
None yet
Development

No branches or pull requests

3 participants