Skip to content

Instantly share code, notes, and snippets.

@dogweather
Created October 4, 2022 02:06
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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