def enum(name, items, start=1, is_int=False):
 enums = [(v, i) for (i, v) in enumerate(items, start)]
 base = (pyenum.IntEnum if is_int else pyenum.Enum)
 base = pyenum.unique(base)
 return base(name, enums)

def enum ( name , items , start = 1 , is_int = False ) : enums = [ ( v , i ) for ( i , v ) in enumerate ( items , start ) ] base = ( pyenum . IntEnum if is_int else pyenum . Enum ) base = pyenum . unique ( base ) return base ( name , enums )
construct a new enum object .