<div dir="ltr">On 13 April 2013 08:32, Barry Warsaw <span dir="ltr"><<a href="mailto:barry@python.org" target="_blank">barry@python.org</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 Apr 12, 2013, at 04:52 PM, R. David Murray wrote:<br>
<br>
>You are right, the problem of comparison of disparate types makes ordering<br>
>a non-starter.  But by the same token that means you are going to have to<br>
>be consistent and give up on having a sorted iteration and a stable repr:<br>
<br>
</div>Why do you make me cry?<br></blockquote><div class="gmail_quote"><br></div>Just using definition order as the stable iteration order would do the trick - no need for any comparisons at all. Subclasses (e.g. IntEnum) can then override it.<div>
<br></div><div>You could then easily have a subclass that implemented comparisons defined based on iteration order. It makes sense not to have this in the base Enum class (it would be confusing).</div><div><br></div><div>
On a related note, I really would like to have the ordinal exposed if this were added.<br><div><div><br></div></div></div><div>Tim Delaney </div></div></div></div>