Skip to content

Match case syntax for imaginary literals allows an extra plus #154775

Description

@encukou

Bug report

#148566 allowed this:

match ...:
    case +1j:
        pass

but also this:

match ...:
    case 1++1j:
        pass

The double plus should not be allowed.

Linked PRs

Metadata

Metadata

Assignees

Labels

interpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions