Path: csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed4a.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.027 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'python.': 0.02; '16,': 0.03; 'anyway.': 0.05; 'received:134': 0.05; 'subject:Python': 0.06; 'agree,': 0.09; 'occurence': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'written': 0.21; '>>>': 0.22; 'header:User-Agent:1': 0.23; 'case.': 0.24; 'logical': 0.24; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'am,': 0.29; 'possibility': 0.29; "doesn't": 0.30; 'code': 0.31; 'indentation': 0.31; 'programmers': 0.33; 'problem': 0.35; 'subject: (': 0.35; 'common': 0.35; 'but': 0.35; 'there': 0.35; 'in.': 0.36; 'reflect': 0.36; 'scheme': 0.36; 'subject:New': 0.37; 'implement': 0.38; 'follows:': 0.38; 'initially': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'structure': 0.39; 'to:addr:python.org': 0.39; 'middle': 0.60; 'most': 0.60; 'break': 0.61; 'times': 0.62; 'such': 0.63; 'more': 0.64; 'physical': 0.72; '2015': 0.84; 'forced': 0.84; 'pardon': 0.84; 'few.': 0.91 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqcEAJeJL1WGuA9G/2dsb2JhbABchDqDFcpAAoINAQEBAQEBhR8BAQQjVRELGAICBRYLAgIJAwIBAgFFEwYCAogmsHqRA4R0AQEIAiCBIYoKhQMWglKBRQEEmy+BHYVviiKDTSKDcW0BgkIBAQE Date: Thu, 16 Apr 2015 12:09:44 +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> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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: 31 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1429178988 news.xs4all.nl 2927 [2001:888:2000:d::a6]:50861 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:89014 On 04/16/2015 11:34 AM, Chris Angelico wrote: > On Thu, Apr 16, 2015 at 6:47 PM, Antoon Pardon > wrote: >> On 04/16/2015 09:46 AM, alister wrote: >> >>> what I find strange is that although these programmers initially disliked >>> forced indentation they were voluntarily indenting there existing code >>> anyway. Take a look at your existing code base & see if this would indeed >>> be the case. >> The problem is that the logical structure one has in one's head is not always >> the same as the physical structure one has to implement in. I prefer the >> indentation of my program to reflect the former instead of the latter. That >> is impossible in python. > I agree, but as it turns out, the number of times when this actually > makes a difference are diminishingly few. 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 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.