git://git.onelab.eu
/
unfold.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
workaround for http://trac.myslice.info/ticket/32
[unfold.git]
/
manifold
/
util
/
enum.py
1
class Enum(object):
2
def __init__(self, *keys):
3
self.__dict__.update(zip(keys, range(len(keys))))
4
self.invmap = {v:k for k, v in self.__dict__.items()}
5
6
def get_str(self, value):
7
return self.invmap[value]