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

Activity

  1. self-assigned this
    on Jul 27, 2026
  2. added
    type-bugAn unexpected behavior, bug, or error
    interpreter-core(Objects, Python, Grammar, and Parser dirs)
    on Jul 27, 2026
  3. added 3 commits that reference this issue on Jul 27, 2026
  4. added a commit that references this issue on Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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