Ejemplo n.º 1
0
 def __getitem__(cls, name):
     try:
         return _EnumMeta.__getitem__(cls, name)
     except KeyError:
         pass
     raise ValueError('kind must be one of: {}'.format(', '.join(
         "'{}'".format(i.name) for i in cls)))
Ejemplo n.º 2
0
 def __getitem__(cls, name):
     return EnumMeta.__getitem__(
         cls.__get_dynamic_enum_class(cls.dynamic_enum_dict), name)