Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsreader4.netcologne.de!news.netcologne.de!xlned.com!feeder7.xlned.com!newsfeed.xs4all.nl!newsfeed4.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.034 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'subject:Python': 0.06; 'arguments': 0.09; 'enum': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'iirc': 0.16; 'proportion': 0.16; 'subject:skip:u 10': 0.16; 'wrote:': 0.18; "aren't": 0.24; 'mon,': 0.24; 'values': 0.27; 'header:In-Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; '13,': 0.31; "d'aprano": 0.31; 'steven': 0.31; 'probably': 0.32; 'quite': 0.32; 'received:209.85': 0.35; 'received:209.85.220': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'list': 0.37; 'received:209': 0.37; 'stopped': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'though,': 0.39; 'to:addr:python.org': 0.39; 'major': 0.40; 'generated.': 0.68; 'terrible': 0.84; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=4Ck7j2cwYfxfBYZBiu8vzTBEegEpEMrPpik01TKhqts=; b=dpT6YDxqDqhPoiaALoq9/eRBNoXIcrEATlC2XoA6ffx/j247tN5Qq9SKDZmu9Z5bm+ ZSw5xt/wJhZ4igJ4UM8Q+gnsEzgWgydXe/aBKewE8f3pJWM2NFawfTNOtLQNq7nVdYI+ BwxgWU2uHJXlz13axjg/EnMLnNEEAOMki1u2SFTDf7Z2HESILvC6zV13b4E0OYHASjgj Xtk+LSGUTHgPTZcYs9PhGNrQ3Y+IdrFeDWXObb7g5u9JJ1pnbjOEY4tXLFxEpB2ZlHtd U+WumaMU/XiAbyrqa7Mi8ix7oXJHabrPoKXehXB0a6SGiRBdF22scxjmg8666YwmpOtr 60TA== MIME-Version: 1.0 X-Received: by 10.52.24.39 with SMTP id r7mr1893228vdf.111.1368466594184; Mon, 13 May 2013 10:36:34 -0700 (PDT) In-Reply-To: <5190bdac$0$29978$c3e8da3$5496439d@news.astraweb.com> References: <5190bdac$0$29978$c3e8da3$5496439d@news.astraweb.com> Date: Tue, 14 May 2013 03:36:34 +1000 Subject: Re: Python's sad, unimaginative Enum From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 17 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1368466597 news.xs4all.nl 15952 [2001:888:2000:d::a6]:48609 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:45253 On Mon, May 13, 2013 at 8:17 PM, Steven D'Aprano wrote: > Let's look at his major criticisms: > > 1) values aren't automatically generated. > > True. So what? That is the *least* important part of enums. I stopped following the -ideas threads about enums, but IIRC autogeneration of values was in quite a few of the specs early on. So you can probably find the arguments against it in the list archives. FWIW, though, I do like C's autogeneration of enum values - but use it in only a small proportion of my enums. It's not a terrible loss, but it is a loss. ChrisA