<div dir="ltr">On 5 May 2013 13:32, Ethan Furman <span dir="ltr"><<a href="mailto:ethan@stoneleaf.us" target="_blank">ethan@stoneleaf.us</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="im">On 05/04/2013 08:11 PM, Tim Delaney wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
  I've been able to achieve the auto-numbering without relying on the internal implementation at all (with a<br>
limitation), with a single change to enum_type.__new__. My previous patch was slightly wrong - fix below as well. All<br>
existing tests pass. BTW, for mix-ins it's required that they have __slots__ = () - might want to mention that in the PEP.<br>
</blockquote>
<br></div>
What happens without `__slots__ = ()` ?<br></blockquote><div><br></div><div>Traceback (most recent call last):<br></div><div>  File "D:\Development\ref435\ref435.py", line 311, in <module></div><div>    class AutoIntEnum(AutoInt, IntEnum):</div>
<div>  File "D:\Development\ref435\ref435.py", line 138, in __new__</div><div>    enum_class = type.__new__(metacls, cls, bases, classdict)</div><div>TypeError: multiple bases have instance lay-out conflict</div>
<div><br></div><div style>Tim Delaney</div></div></div></div>