Skip to content

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

@CBerJun

Description

@CBerJun

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions