Skip to content

Instantly share code, notes, and snippets.

@cosinekitty
Last active May 9, 2020 01:15
Show Gist options
  • Select an option

  • Save cosinekitty/c5392c63974566eb78204339265b6250 to your computer and use it in GitHub Desktop.

Select an option

Save cosinekitty/c5392c63974566eb78204339265b6250 to your computer and use it in GitHub Desktop.
Different enumerated types can have same values, but still be distinct.
from enum import Enum, unique
@unique
class Suit(Enum):
Club = 1
Diamond = 2
Heart = 3
Spade = 4
@unique
class Animal(Enum):
Dog = 1
Cat = 2
Llama = 3
Octopus = 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment