Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: Writing a blog post on the new Enum.

Thread Tools

Re: Writing a blog post on the new Enum.

Terry Jan Reedy
Posts: n/a
On 5/14/2013 3:52 AM, Chris Angelico wrote:
> On Tue, May 14, 2013 at 9:40 AM, Fábio Santos <(E-Mail Removed)> wrote:


> 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.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Writing a blog post on the new Enum. Ethan Furman Python 0 05-13-2013 11:09 PM
Re: Writing a blog post on the new Enum. Mark Lawrence Python 0 05-13-2013 10:56 PM
Writing a blog post on the new Enum. Fábio Santos Python 0 05-13-2013 09:44 PM
Windows 8 - so bad it's hastening the death of the PC? ~misfit~ NZ Computing 18 04-15-2013 04:15 AM
blog blog blog John Computer Information 0 02-13-2005 10:20 AM