Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!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: UNSURE 0.207 X-Spam-Level: ** X-Spam-Evidence: '*H*': 0.70; '*S*': 0.12; 'else:': 0.03; 'elif': 0.05; 'level,': 0.07; 'python': 0.11; 'indent': 0.16; 'option:': 0.16; 'readability': 0.16; 'sequence:': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'seems': 0.21; 'aug': 0.22; 'header:User- Agent:1': 0.23; 'header:In-Reply-To:1': 0.27; '+0100,': 0.31; "d'aprano": 0.31; 'steven': 0.31; 'subject:end': 0.31; 'option': 0.32; 'fri,': 0.33; 'except': 0.35; 'really': 0.36; 'combination': 0.36; 'sequence': 0.36; 'level': 0.37; 'saves': 0.38; 'whatever': 0.38; 'to:addr:python-list': 0.38; 'short': 0.38; 'to:addr:python.org': 0.39; 'enough': 0.39; 'either': 0.39; 'situation': 0.65; 'between': 0.67; 'fourth': 0.84; 'gains': 0.84; 'pardon': 0.84; 'received:192.168.1.7': 0.84; 'received:195.238': 0.84; 'received:195.238.6': 0.84; 'received:belgacom.be': 0.84; 'received:isp.belgacom.be': 0.84; 'absolutely': 0.87; 'mistake': 0.91; 'write:': 0.91; '2013': 0.98 X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApQBAKibI1JQyEM1/2dsb2JhbAANTYc0ukODAoE0gxgBAQEDASMPAQU0DBELGAICBRYLAgIJAwIBAgFFEwgCh3imWHSITYkRgSmOXRaCU4E0A5d1lQg Date: Sun, 01 Sep 2013 21:58:15 +0200 From: Antoon Pardon User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130704 Icedove/17.0.7 MIME-Version: 1.0 To: python-list@python.org Subject: Re: semicolon at end of python's statements References: <1377735506.18906.15.camel@debian> <1FETt.52607$Mw4.14965@fx15.am4> <7wob8gywds.fsf@benfinney.id.au> <52213435$0$6599$c3e8da3$5496439d@news.astraweb.com> In-Reply-To: <52213435$0$6599$c3e8da3$5496439d@news.astraweb.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Sun, 01 Sep 2013 22:55:10 +0200 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: 39 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1378068912 news.xs4all.nl 15881 [2001:888:2000:d::a6]:55575 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:53432 Op 31-08-13 02:09, Steven D'Aprano schreef: > On Fri, 30 Aug 2013 11:32:17 +0100, Fábio Santos wrote: > > > We really are spoiled for choice here. We can write any of these: > > # Option 1 > for spam in sequence: > if predicate(spam): > process(spam) > > > Adding a fourth option: > > for spam in sequence if predicate(spam): > process(spam) > > saves absolutely nothing except a line and an indent level, neither of > which are in short supply, and gains nothing in readability over Option 1. So what is the big difference between this situation and the following: | else: | if condition: | whatever which in python we can write: | elif condition: | whatever So either is seems this was a design mistake or a line and an indent level can be important enough to allow a combination of controls. -- Antoon Pardon