def __new__(cls, name, bases, classdict, **options): enum_members = OrderedDict(classdict, __eq__=eq_enum) # We remove the Meta attribute from the class to not collide # with the enum values. enum_members.pop('Meta', None) enum = PyEnum(cls.__name__, enum_members) return SubclassWithMeta_Meta.__new__(cls, name, bases, OrderedDict(classdict, __enum__=enum), **options)
def __new__(cls, name, bases, classdict, **options): enum_members = OrderedDict(classdict, __eq__=eq_enum) # We remove the Meta attribute from the class to not collide # with the enum values. enum_members.pop("Meta", None) enum = PyEnum(cls.__name__, enum_members) return SubclassWithMeta_Meta.__new__( cls, name, bases, OrderedDict(classdict, __enum__=enum), **options)
def __new__(cls, name, bases, classdict, **options): enum = PyEnum(cls.__name__, OrderedDict(classdict, __eq__=eq_enum)) return SubclassWithMeta_Meta.__new__(cls, name, bases, OrderedDict(classdict, __enum__=enum), **options)
def __new__(cls, name, bases, classdict, **options): enum = PyEnum(cls.__name__, OrderedDict(classdict, __eq__=eq_enum)) return SubclassWithMeta_Meta.__new__( cls, name, bases, OrderedDict(classdict, __enum__=enum), **options)