Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #45298
| From | Terry Jan Reedy <tjreedy@udel.edu> |
|---|---|
| Subject | Re: Writing a blog post on the new Enum. |
| Date | 2013-05-14 11:07 -0400 |
| References | <CAA=1kxQxcGpDzR6VDEb1urjjn4bnRvi4aoXKKa5+vgG186hzOg@mail.gmail.com> <519172C3.4030108@stoneleaf.us> <CAA=1kxSHKjoTYZZ7Gs_Tpo+h3hRVQRb0p8aeEnnKuXf9jWA4cA@mail.gmail.com> <CAPTjJmpK2yRbDxy5SZQXvRi3dH0UGSmihNU4NJcpu_DY7A=+1g@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1671.1368544092.3114.python-list@python.org> (permalink) |
On 5/14/2013 3:52 AM, Chris Angelico wrote: > On Tue, May 14, 2013 at 9:40 AM, Fábio Santos <fabiosantosart@gmail.com> 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.
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Writing a blog post on the new Enum. Terry Jan Reedy <tjreedy@udel.edu> - 2013-05-14 11:07 -0400
csiph-web