Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
from enum import Enum
class Color(Enum):
RED = "RED"
GREEN = "GREEN"
BLUE = "BLUE" # I just added this
def handle_color(color: Color):
match (color):
case Color.RED:
...
case Color.GREEN:
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment