On 5 May 2013 13:32, Ethan Furman <ethan at 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20130505/f4dd2f52/attachment.html>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4