Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'cpython': 0.05; 'pep': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'rewrite': 0.09; 'subject:blog': 0.09; 'python': 0.11; '2.7': 0.14; 'enum': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:Writing': 0.16; 'subject:post': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'module': 0.19; 'header:User-Agent:1': 0.23; 'earlier': 0.24; 'looks': 0.24; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'am,': 0.29; 'code': 0.31; 'that.': 0.31; '3.x': 0.31; 'url:05': 0.31; 'class': 0.32; 'supposed': 0.32; 'core': 0.34; 'subject:the': 0.34; 'plans': 0.35; 'there': 0.35; 'version': 0.36; '14,': 0.36; 'module.': 0.36; 'two': 0.37; 'subject:new': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'received:173': 0.61; 'url:blogspot': 0.65; 'believe': 0.68; 'ethan': 0.84; 'received:fios.verizon.net': 0.84; 'url:2013': 0.84; 'url:pt': 0.91; '2013': 0.98 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Jan Reedy Subject: Re: Writing a blog post on the new Enum. Date: Tue, 14 May 2013 11:07:58 -0400 References: <519172C3.4030108@stoneleaf.us> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: pool-173-75-251-66.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1368544093 news.xs4all.nl 15970 [2001:888:2000:d::a6]:46062 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:45298 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.