Problems with subclassing enum34

Thomas Heller theller at ctypes.org
Fri Jun 28 11:32:10 EDT 2013


Am 28.06.2013 17:25, schrieb Thomas Heller:
> Robert Kern:
>
>>
>> enum.EnumMeta uses super() in its __new__() implementation but
>> _ctypes.PyCSimpleType doesn't. Thus, only
>> _ctypes.PyCSimpleType.__new__() gets a chance to run. Switching the
>> order of the two might work.
>>
>
> Robert found the problem but I'm unsure if there is a solution.
> Also I'm unsure whether this is a bug in ctypes or in enum or if
> they are simply incompatible.

I forgot to mention that switching the order of metaclasses didn't work.

Thomas




More information about the Python-list mailing list