[Python-Dev] PEP 435 -- Adding an Enum type to the Python standard library (original) (raw)
Nick Coghlan ncoghlan at gmail.com
Mon Apr 22 01:02:00 CEST 2013
- Previous message: [Python-Dev] PEP 435 -- Adding an Enum type to the Python standard library
- Next message: [Python-Dev] PEP 435 -- Adding an Enum type to the Python standard library
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 22 Apr 2013 07:50, "Barry Warsaw" <barry at python.org> wrote:
On Apr 20, 2013, at 07:10 PM, R. David Murray wrote: >It seems strange to limit a new Python3 feature to the Python2 feature >set. Just saying :) For a critical feature sure, but I don't put repr or enum item iteration order in that category. There's no need for gratuitous incompatibility either, and attribute name order is just fine.
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
Cheers, Nick.
-Barry
Python-Dev mailing list Python-Dev at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20130422/3737306f/attachment.html>
- Previous message: [Python-Dev] PEP 435 -- Adding an Enum type to the Python standard library
- Next message: [Python-Dev] PEP 435 -- Adding an Enum type to the Python standard library
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]