Skip to content

Instantly share code, notes, and snippets.

@Ayrx

Ayrx/enum.py

Created Oct 10, 2013
Embed
What would you like to do?
Code snippet for using enum in Python 2. http://stackoverflow.com/a/1695250/1170681
def enum(**enums):
return type('Enum', (), enums)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment