[Python-Dev] PEP 435 - requesting pronouncement
timothy.c.delaney at gmail.com
Sun May 5 05:34:48 CEST 2013
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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev