Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
def Enum():
class GettattrDefaultDict(defaultdict):
def __getattr__(self, name):
return self[name]
return GettattrDefaultDict(iter(xrange(sys.maxint)).next)
Status = Enum()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.