Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.018 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'elif': 0.05; 'subject:Python': 0.06; 'assigning': 0.09; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'once.': 0.16; 'pythonic': 0.16; 'subject:user': 0.16; 'temporary,': 0.16; 'wrote:': 0.18; 'select': 0.22; 'otherwise,': 0.22; 'comparing': 0.24; 'equivalent': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'received:google.com': 0.35; 'subject:New': 0.37; 'nov': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'subject: / ': 0.60; 'more': 0.64; 'temporary': 0.65; 'everything.': 0.84; '2013': 0.98 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:to :content-type; bh=waO8srgP4s7o/ekPK/eGbubGfxn5rqeKUHuzZf83CU0=; b=QVjdcE0OZK2vuegp/QqZlRmNpzH/4+725a6LquA3ADRSePQKsO0sF6o6GQRA0Cwoqk UDGHS9+5Ud3fYNpKfJrDgl3iOAt1W91Pl9vE6R207TKotTjzlvyDeaouRuMDQW3J66f0 6m5KQQZlJBF9fUO2RpRIlcmCIuWNPNhc3c54xfDwaL1MUOQIWNIxv6WncZmdaMc0RP7e SXZBDif3gtLOkGD9hPAGgHB7EoIcjbNwhZ473iMM88TLIlUoX2jRf3JbJ6QaP9mTA6o4 CKKhvYI/mucGfcscsRqRVG7OpQjAjnBG7V5Gn1v5jTwTWm6NABI75g5yTnqeWlOd1+yg H7QQ== MIME-Version: 1.0 X-Received: by 10.68.4.197 with SMTP id m5mr22373101pbm.46.1384039788657; Sat, 09 Nov 2013 15:29:48 -0800 (PST) In-Reply-To: <1aed3f12-6802-48fa-b149-f2a84b8149b7@googlegroups.com> References: <-JadnUirYuhUruPPnZ2dnUVZ8rSdnZ2d@bt.com> <1aed3f12-6802-48fa-b149-f2a84b8149b7@googlegroups.com> Date: Sun, 10 Nov 2013 10:29:48 +1100 Subject: Re: New user's initial thoughts / criticisms of Python 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: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1384039797 news.xs4all.nl 15925 [2001:888:2000:d::a6]:43994 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:58975 On Sun, Nov 10, 2013 at 9:44 AM, Jonathan wrote: > In pythonic syntax: > > select : > case ,[],: > which is equivalent to: elif = : > which is equivalent to: elif Small clarification: It's more akin to assigning to a temporary, and then comparing that temporary against everything. It's only evaluated once. Otherwise, yes, as you describe. ChrisA