Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: Case Statements Date: Thu, 17 Mar 2016 20:55:33 +1100 Lines: 17 Message-ID: References: <30502a2e-0bad-4b0f-a1e8-a2b40b0d7ab9@googlegroups.com> <56E928D4.3000701@rece.vub.ac.be> <56E93ADD.9040500@rece.vub.ac.be> <56E961C9.7040008@rece.vub.ac.be> <56E97B60.3060402@rece.vub.ac.be> <56E9A66E.4030905@rece.vub.ac.be> <56e9f7f9$0$1597$c3e8da3$5496439d@news.astraweb.com> <56ea0e4f$0$1585$c3e8da3$5496439d@news.astraweb.com> <56EA778B.80109@rece.vub.ac.be> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de o4WuknrXG9Ae/C5eJsVPxgoWZZLzfoxP1/nxquAV1w7w== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.014 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'received:209.85.223': 0.03; 'cc:addr:python-list': 0.09; 'global,': 0.09; 'python': 0.10; 'syntax': 0.13; 'interpreter': 0.15; 'thu,': 0.15; '2016': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'simple.': 0.16; 'wrote:': 0.16; "wouldn't": 0.16; 'language': 0.19; '>>>': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'decorator': 0.22; 'either.': 0.22; 'tried': 0.24; 'header:In-Reply-To:1': 0.24; 'chris': 0.26; 'message-id:@mail.gmail.com': 0.27; "i'm": 0.30; 'classes': 0.30; 'work.': 0.30; "d'aprano": 0.33; 'steven': 0.33; 'though.': 0.33; 'received:google.com': 0.35; 'could': 0.35; 'but': 0.36; 'received:209.85': 0.36; 'depends': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'things': 0.38; 'received:209': 0.38; 'mean': 0.38; 'sure': 0.39; 'does': 0.39; 'mar': 0.65; 'angelico:': 0.84; 'chrisa': 0.84; 'guarantee.': 0.84; 'messed': 0.84; 'pardon': 0.84; 'schreef': 0.84; 'to:none': 0.91; 'thing,': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc; bh=QLTZQDt0m9lGNyKZ3p4Brcc5inWXaatpPg/rkb4Wnwg=; b=nK7d0n2CrNL8bMmAt+O0bV/gqDIEaf8MHg8L9KLheAmcBdN/RsmKercqMW7VC1MwOP jOqoEXfCRSZX5sZ9xa1jW99boALl5XoQ6vZD44c/fCG4gBNKHiqdtVnYhkTptWEVuCUs F7QEeTZuRD6ZrkTSRD7zCNxUm6bEtGZHgwNU+vp0s3il4xG3FY7AGoYzgA7ebn3RpjkN PCFV+PgFYz0NiiaBUFL7YOpU+19oX6E2eG4JeT1u9dcKJ/qNKRt7aMV9+iKg0zJa65La TjvD0JpanxIFtpWhV3qYLqxmHTHRs1meLEm5IxeH2KwMl9KEuwrMIkSBzs7/QYhspeeQ Za5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:cc; bh=QLTZQDt0m9lGNyKZ3p4Brcc5inWXaatpPg/rkb4Wnwg=; b=b+21n+wrpUpwcvm1qpXSjfOZBjOvPqsPpzxzsijFkS+6H7yaTATh77vzsJ5YLGAE1r 9CCEAMy4HwtnVfFvyawmVpS1DoAAWtz34HCH09AbVZ3uVuzmQmBGEixUQw1qb0K6O6vK YuKe8ryjGvtQL2BQAR1cYd48QwHgCKGcOFLRZLCUzjUpexxRpOAisLNFmCJg8cejW9Mf j6DsEMdUdBodJ84haB2ZDEeww5Er55Vcxv4qpvmVgnAW4x9YDp9LXQG0nConKjPenMqp dPKVhtYUhJ0UG5W9wF3T1HVUrZ2fi14lfw+jryCKpaPdLqT5VexVsVW0WXW3LN3VbKiV zi5A== X-Gm-Message-State: AD7BkJK/09AuHQGkB+IqC53vF/fP62iGzfLl0JNVJXSmDwDpog/66JqEWm67UnAVdZZ65aw9NasGLw43BaxOkg== X-Received: by 10.107.128.104 with SMTP id b101mr8319098iod.31.1458208534225; Thu, 17 Mar 2016 02:55:34 -0700 (PDT) In-Reply-To: <56EA778B.80109@rece.vub.ac.be> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:105080 On Thu, Mar 17, 2016 at 8:23 PM, Antoon Pardon wrote: > Op 17-03-16 om 03:02 schreef Chris Angelico: >> On Thu, Mar 17, 2016 at 12:54 PM, Steven D'Aprano wrote: >> >>> I wouldn't want to rely on it working with decorator syntax either. Even if >>> it does now, I'm not sure that's a language guarantee. >> That's the thing, though. It's not a guarantee, yet it does work in >> every Python interpreter that I tried it in. > > That depends on what you mean by work. This failes: > [doing the same thing in a function] Very true; I could have messed around with getframe, but most classes are global, and it keeps things simple. ChrisA