Skip to content
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

Match statement's signed_number token is not properly defined #123580

Closed
CBerJun opened this issue Sep 1, 2024 · 2 comments
Closed

Match statement's signed_number token is not properly defined #123580

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

Comments

@CBerJun
Copy link
Contributor

CBerJun commented Sep 1, 2024

Documentation

It seems that the last line in the following production list intended to define the token signed_number but mistakenly put it inside the definition of literal_pattern.

.. productionlist:: python-grammar
literal_pattern: `signed_number`
: | `signed_number` "+" NUMBER
: | `signed_number` "-" NUMBER
: | `strings`
: | "None"
: | "True"
: | "False"
: | `signed_number`: NUMBER | "-" NUMBER

The intended meaning might be:

signed_number: NUMBER | "-" NUMBER

Linked PRs

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

Eclips4 commented Sep 1, 2024

Thanks for the report!
Would you like to send a PR with fix? :)

encukou pushed a commit that referenced this issue Sep 3, 2024
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Sep 3, 2024
…-123582)

(cherry picked from commit 9e079c2)

Co-authored-by: CBerJun <121291537+CBerJun@users.noreply.github.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Sep 3, 2024
…-123582)

(cherry picked from commit 9e079c2)

Co-authored-by: CBerJun <121291537+CBerJun@users.noreply.github.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
encukou pushed a commit that referenced this issue Sep 4, 2024
…) (GH-123623)

gh-123580: Fix `signed_number` token in documentation (GH-123582)

(cherry picked from commit 9e079c2)

Co-authored-by: CBerJun <121291537+CBerJun@users.noreply.github.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
encukou pushed a commit that referenced this issue Sep 4, 2024
…) (GH-123624)

gh-123580: Fix `signed_number` token in documentation (GH-123582)

(cherry picked from commit 9e079c2)

Co-authored-by: CBerJun <121291537+CBerJun@users.noreply.github.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
@picnixz
Copy link
Member

picnixz commented Sep 4, 2024

Closing as completed and backported.

@picnixz picnixz closed this as completed Sep 4, 2024
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