On 5 May 2013 13:32, Ethan Furman <et...@stoneleaf.us> wrote: > On 05/04/2013 08:11 PM, Tim Delaney wrote: > >> >> I've been able to achieve the auto-numbering without relying on the >> internal implementation at all (with a >> limitation), with a single change to enum_type.__new__. My previous patch >> was slightly wrong - fix below as well. All >> existing tests pass. BTW, for mix-ins it's required that they have >> __slots__ = () - might want to mention that in the PEP. >> > > What happens without `__slots__ = ()` ? >
Traceback (most recent call last): File "D:\Development\ref435\ref435.py", line 311, in <module> class AutoIntEnum(AutoInt, IntEnum): File "D:\Development\ref435\ref435.py", line 138, in __new__ enum_class = type.__new__(metacls, cls, bases, classdict) TypeError: multiple bases have instance lay-out conflict Tim Delaney
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com