Path: csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed1.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: UNSURE 0.208 X-Spam-Level: ** X-Spam-Evidence: '*H*': 0.59; '*S*': 0.00; 'received:134': 0.05; 'subject:Python': 0.06; 'python': 0.11; 'occurence': 0.16; 'wrote:': 0.18; 'written': 0.21; 'header:User-Agent:1': 0.23; 'logical': 0.24; 'header:In-Reply-To:1': 0.27; 'possibility': 0.29; "doesn't": 0.30; 'code': 0.31; "d'aprano": 0.31; 'indentation': 0.31; 'steven': 0.31; 'up.': 0.33; 'sense': 0.34; 'subject: (': 0.35; 'common': 0.35; 'something': 0.35; 'but': 0.35; 'scheme': 0.36; 'example,': 0.37; 'subject:New': 0.37; 'sometimes': 0.38; 'follows:': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'does': 0.39; 'structure': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'middle': 0.60; 'most': 0.60; 'break': 0.61; 'new': 0.61; 'making': 0.63; 'real': 0.63; 'such': 0.63; 'today': 0.64; 'more': 0.64; 'nobody': 0.68; 'physical': 0.72; 'introduce': 0.78; '2015': 0.84; 'pardon': 0.84 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqcEAKqXL1WGuA9G/2dsb2JhbABch0/HaIJcAoIOAQEBAQEBhR4BAQEDASNVEQsYAgIFFgsCAgkDAgECAUUTCAKIHgixCZB+hHQBAQgCIIEhigqFAxaCUoFFAQSbL4cMjW8ig3GDMAEBAQ Date: Thu, 16 Apr 2015 13:07:22 +0200 From: Antoon Pardon User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.5.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: New to Python - block grouping (spaces) References: <9fc57fc9-0399-4ff3-882a-d041f02827d8@googlegroups.com> <552F772B.8030201@rece.vub.ac.be> <552f9264$0$11092$c3e8da3@news.astraweb.com> In-Reply-To: <552f9264$0$11092$c3e8da3@news.astraweb.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Thu, 16 Apr 2015 13:31:00 +0200 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20 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: 46 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1429183861 news.xs4all.nl 2845 [2001:888:2000:d::a6]:33335 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:89017 On 04/16/2015 12:43 PM, Steven D'Aprano wrote: > On Thursday 16 April 2015 20:09, Antoon Pardon wrote: > >> I beg to differ. The most common occurence is a loop with a break >> condition in the middle I would prefer such a loop to be written as >> follows: >> >> repeat: >> some >> code >> break_when condition: >> more >> code > > That structure makes no sense to me. Why is the "break_when" *outside* of > the loop? Why does the "break_when condition" introduce a new block? How do you mean outside the loop? Do you consider the "else" outside the if statement? >> Actually I would prefer a more elaborate scheme but would be contend with >> a possibility like the above. IMO this is the most occuring pattern where >> the logical structure doesn't match the physical structure and it is not >> occuring relevantly less now. > > Judging by the above example, I think it may be a good thing that Python > doesn't allow "more elaborate" indentation schemes. > > repeat: > do this > do that > do something else important > and this > sometimes this > also this > but don't do this > unless today is Tuesday > # end loop > > > > Simplicity is a virtue. As is argueing against a real position instead of making something up. Nobody is argueing for arbitrary indentation.