Skip to content

Instantly share code, notes, and snippets.

@Ayrx
Created October 10, 2013 03:17
Show Gist options
  • Save Ayrx/6912517 to your computer and use it in GitHub Desktop.
Save Ayrx/6912517 to your computer and use it in GitHub Desktop.
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