python 中的枚举
# enum.py class Enum(set): def __getattr__(self, name): if name in self: return name raise AttributeError myEnum = Enum(["A","B","C"])