Re: Writing a blog post on the new Enum.

Discussion in 'Python' started by Terry Jan Reedy, May 14, 2013.

  1. On 5/14/2013 3:52 AM, Chris Angelico wrote:
    > On Tue, May 14, 2013 at 9:40 AM, Fábio Santos <> wrote:


    >> http://fabiosantoscode.blogspot.pt/2013/05/pythons-new-enum-class.html

    >
    > class Text(unicode, Enum):
    > one = u'one'
    > two = u'two'
    > three = u'three'


    Is this supposed to be a quote? or your rewrite? or did Santos rewrite
    after you posted? The blog currently has a 3.x version of that.

    > That looks like Python 2 code. Are you backporting Enum to Py2
    > manually? AIUI the Python core won't be adding features like that to
    > 2.7, and there won't be a 2.8, so PEP 435 will be Py3.4+ only. Or have
    > I misunderstood it?


    As far as official CPython goes, Enum is 3.4+ only. I believe the module
    will continue to work on earlier 3.x and will remain externally
    available as a 3rd party module. Ethan said he plans to backport to 2.7
    so 2 & 3 code can use enums.
     
    Terry Jan Reedy, May 14, 2013
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Fábio Santos

    Writing a blog post on the new Enum.

    Fábio Santos, May 13, 2013, in forum: Python
    Replies:
    0
    Views:
    95
    Fábio Santos
    May 13, 2013
  2. Mark Lawrence

    Re: Writing a blog post on the new Enum.

    Mark Lawrence, May 13, 2013, in forum: Python
    Replies:
    0
    Views:
    91
    Mark Lawrence
    May 13, 2013
  3. Ethan Furman

    Re: Writing a blog post on the new Enum.

    Ethan Furman, May 14, 2013, in forum: Python
    Replies:
    0
    Views:
    83
    Ethan Furman
    May 14, 2013
  4. Fábio Santos

    Re: Writing a blog post on the new Enum.

    Fábio Santos, May 14, 2013, in forum: Python
    Replies:
    0
    Views:
    81
    Fábio Santos
    May 14, 2013
  5. Chris Angelico

    Re: Writing a blog post on the new Enum.

    Chris Angelico, May 14, 2013, in forum: Python
    Replies:
    0
    Views:
    100
    Chris Angelico
    May 14, 2013
Loading...

Share This Page