-
Notifications
You must be signed in to change notification settings - Fork 330
Labels
new feature/enhancementProposing a new feature or enhancement to existing feature.Proposing a new feature or enhancement to existing feature.
Description
Currently, our pattern matching supports the | (OR) operator for combining multiple patterns, e.g.:
case [1, 2] | [3, 4]:
print("Matched either [1, 2] or [3, 4].")
However, it would be more readable and natural to allow multiple case labels like in JavaScript or TypeScript, for example:
case [1, 2]:
case [3, 4]:
print("Matched either [1, 2] or [3, 4].")
This style improves visual clarity, especially when handling longer or more descriptive cases, and aligns with familiar syntax from other popular languages.

Metadata
Metadata
Assignees
Labels
new feature/enhancementProposing a new feature or enhancement to existing feature.Proposing a new feature or enhancement to existing feature.
Type
Projects
Status
Changes Requested