Skip to content

Standardize on Python match/case-style blocks #681

Closed
@evhub

Description

@evhub

Should deprecate case/cases blocks with match statements inside of them in favor the Python-style match block with case statements inside of it. However, since this is inconsistent with the stand-alone match <pat> in <it> statement that puts the pattern after the match keyword, we'll also want to add a new stand-alone match statement that puts the item to be matched against after the match keyword like the Python syntax. For that, the proposed syntax is:

match <item> with <pattern>:
    ...

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions