Skip to content

Instantly share code, notes, and snippets.

@dogweather
Created October 4, 2022 02:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dogweather/ecb08c31ad5e76c2caa9f70683d896d9 to your computer and use it in GitHub Desktop.
Save dogweather/ecb08c31ad5e76c2caa9f70683d896d9 to your computer and use it in GitHub Desktop.
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