Skip to content
This repository was archived by the owner on Nov 21, 2022. It is now read-only.
This repository was archived by the owner on Nov 21, 2022. It is now read-only.

Bring 'else' back? #89

Open
Open
@gvanrossum

Description

@gvanrossum

There were several commenters on today's revealing of the PEP on python-dev who want an else clause instead of case _: to enter final catch-all block. It's not terrible. If we do this I propose it should be indented with the case clauses:

match t:
    case P1():
        ...
    case P2():
        ...
    else:
        ...

I'm trying to hold this off a little longer, but it may be an easy thing to give.

Metadata

Metadata

Assignees

No one assigned

    Labels

    fully peppedIssues that have been fully documented in the PEPrejectedA rejected idea

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions