Skip to content

use context manager instead of global variable #1

Description

@etam

Proposed usage:

x=5withswitch(x) assw:
ifsw.case(4):
assertFalseifsw.case(5):
assertTruesw.fallthrough()
ifsw.case(lambdax: x>3):
assertTrueifsw.case(6):
assertFalseifsw.default():
assertFalse

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions