On Sun, 21 Apr 2013 20:28:16 -0400, Barry Warsaw <ba...@python.org> wrote: > On Apr 22, 2013, at 09:02 AM, Nick Coghlan wrote: > > >Iteration order matters a lot if you don't want people complaining about > >enums being broken: > > > > class Days(enum.Enum): > > Monday = 1 > > Tuesday = 2 > > Wednesday = 3 > > Thursday = 4 > > Friday = 5 > > Saturday = 6 > > Sunday = 7 > > Sorry, that's still not a complete use case. I don't see why you'd depend on > iteration order over Days for any particular functionality. Besides, if you > did, I think it would be better to derive Days from IntEnum and then iteration > order is guaranteed over the values.
I didn't read Nick's message as being about a use case. The key word in the sentence above was "complaining" :) Regardless of the specific values involved, it is pretty much guaranteed that if anything other than definition order is used we *will* get bug reports/enhancement requests to fix it, on a regular basis. We can choose to live with that, but we should admit that it will will happen :) --David _______________________________________________ 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