Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1.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: OK 0.166 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.67; '*S*': 0.00; 'parser': 0.07; 'bug.': 0.09; 'python': 0.11; 'bug': 0.12; 'gui': 0.12; '"end"': 0.16; 'block.': 0.16; 'bracket': 0.16; 'honesty': 0.16; 'indent': 0.16; 'subject:after': 0.16; 'subject:beginner': 0.16; 'subject:python': 0.16; 'language': 0.16; 'wrote:': 0.18; 'examples': 0.20; 'meant': 0.20; 'example': 0.22; 'header:User-Agent:1': 0.23; 'certainly': 0.24; 'header:In-Reply-To:1': 0.27; 'tim': 0.29; "doesn't": 0.30; 'statement': 0.30; 'code': 0.31; 'that.': 0.31; 'received:192.168.1.3': 0.31; 'schemes': 0.31; 'trace': 0.31; 'style': 0.33; 'actual': 0.34; 'maybe': 0.34; 'problem': 0.35; 'editor': 0.35; 'but': 0.35; 'should': 0.36; 'searching': 0.37; 'to:addr:python-list': 0.38; 'fact': 0.38; 'rather': 0.38; 'structure': 0.39; 'to:addr:python.org': 0.39; 'even': 0.60; 'easy': 0.60; 'course': 0.61; 'save': 0.62; 'email addr:gmail.com': 0.63; 'kind': 0.63; 'such': 0.63; 'choose': 0.64; 'provide': 0.64; 'world': 0.66; 'hours': 0.66; 'promise': 0.68; 'subject:day': 0.69; 'subject:First': 0.74; 'confusing': 0.84; 'confusion.': 0.84; 'end.': 0.84; 'pardon': 0.84; 'received:195.238': 0.84; 'received:195.238.6': 0.84; 'received:belgacom.be': 0.84; 'received:isp.belgacom.be': 0.84; 'resulted': 0.84; 'subject:add': 0.91 X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApMBAC8edlJQyLEg/2dsb2JhbAANTMNhgTCDGQEBAQR4EQsYCRYPCQMCAQIBDzYTBgICh2sDFKoiiH0NV4kUjGiCdxaEGAOWH4FrjFKIXg Date: Sun, 03 Nov 2013 12:33:56 +0100 From: Antoon Pardon User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130922 Icedove/17.0.9 MIME-Version: 1.0 To: python-list@python.org Subject: Re: First day beginner to python, add to counter after nested loop References: <4d1c9a55-310b-41b7-8271-435fd095ce70@googlegroups.com> <7e0b17ea-3a79-45e7-aefc-795f3f34af95@googlegroups.com> <20e6a79f-2d0e-4e78-8af6-607375eca676@googlegroups.com> <7a457657-7a38-4f68-a33f-820b4629df31@googlegroups.com> <7ana791h1gqn485mk8uti1cd7k8lklp1i8@4ax.com> In-Reply-To: <7ana791h1gqn485mk8uti1cd7k8lklp1i8@4ax.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: 33 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1383478438 news.xs4all.nl 15865 [2001:888:2000:d::a6]:41845 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:58391 Op 02-11-13 21:19, Tim Roberts schreef: > jonas.thornvall@gmail.com wrote: >> >> I certainly do not like the old bracket style it was a catastrophe, but >> in honesty the gui editor of python should have what i propose, a parser >> that indent automaticly at loops, functions and end. > > Many editors do that. Vim, which is what I use, certainly does. > >> I promise you it will save millions of hours of bug searching all over >> world in a month. > > I suspect you meant "dozens" rather than "millions"... > > Look, both schemes have their pitfalls. With an "end" requirement, it's > easy to have code where the indenting doesn't match the actual nesting, and > that causes human confusion. Not really. All examples of this kind of confusion I have seem come from C where the problem IMO comes from the fact that people can choose to put one statement after a control structure or a block. I have programmed sometime in modula2 and this mismatch was just not a big deal in that language because such a mismatch usualy resulted in an end missing and the code not compiling, which resolves the confusion rather quickly. Now of course I can mis something. Maybe you can provide an example that would be confusing even with modula2 kind of control structures and still compile and produce a hard to trace bug. -- Antoon Pardon