A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2013-April/125412.html below:

[Python-Dev] PEP 435 -- Adding an Enum type to the Python standard library

[Python-Dev] PEP 435 -- Adding an Enum type to the Python standard library [Python-Dev] PEP 435 -- Adding an Enum type to the Python standard libraryNick Coghlan ncoghlan at gmail.com
Mon Apr 22 01:02:00 CEST 2013
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>
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4