Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.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.029 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'argument': 0.05; 'parser': 0.07; 'suddenly': 0.07; 'inserted': 0.09; 'spaces': 0.09; "(i'm": 0.16; 'braces': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject:after': 0.16; 'subject:beginner': 0.16; 'tab': 0.16; 'tabs': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'either.': 0.24; 'simpler': 0.24; 'holds': 0.26; 'post': 0.26; 'header:In-Reply-To:1': 0.27; "doesn't": 0.30; 'mix': 0.30; 'message-id:@mail.gmail.com': 0.30; 'indentation': 0.31; "i'd": 0.34; 'agree': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'consistent': 0.36; 'should': 0.36; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'anything': 0.39; 'to:addr:python.org': 0.39; 'tell': 0.60; "you'll": 0.62; 'school': 0.64; '30,': 0.65; 'subject:day': 0.69; 'subject:First': 0.74; 'pain': 0.84; 'pardon': 0.84; 'water.': 0.84; 'subject:add': 0.91; 'trouble.': 0.91; '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=OIvzilcyYBML7W3/FiPOcwe55VJrl/3jFHNGBKM/XHk=; b=uuDwaClJFucyqjUhm5MuD5KRy4KPVKoo7U0TprAVjfy93lV6dxmqEEt+b5nEmrCo0y adUaDgXG7Kl7jHZR3ssjsvPhw3YkpvD98dkqCl3NBi4vSbfCU6HJe6XmAs+anTkZBiv1 RYwgPCA2+RNvhvlfdAOl3kDvhYnUZED5NRhPCvHuOox2bEwsIEy8bGRk21fGj8QKV7n5 /gd/L05ODfpIXfOzbxQ5g/PiYNBkNGQjrrdb0XpbeaEc07AqVZDfUug+ZkDbSiXukRhu ngjBm58zxPHIbsJ7Z7QEtHb2eGxJ7ouDzS4ncrHHiwT0EWdbtBpnwZuPJEz3OVH75xoI CmHg== MIME-Version: 1.0 X-Received: by 10.68.59.38 with SMTP id w6mr4672178pbq.135.1383135471283; Wed, 30 Oct 2013 05:17:51 -0700 (PDT) In-Reply-To: <5270F529.5040307@rece.vub.ac.be> References: <4d1c9a55-310b-41b7-8271-435fd095ce70@googlegroups.com> <7e0b17ea-3a79-45e7-aefc-795f3f34af95@googlegroups.com> <20e6a79f-2d0e-4e78-8af6-607375eca676@googlegroups.com> <5270F529.5040307@rece.vub.ac.be> Date: Wed, 30 Oct 2013 23:17:51 +1100 Subject: Re: First day beginner to python, add to counter after nested loop 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: 14 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1383135479 news.xs4all.nl 15976 [2001:888:2000:d::a6]:43611 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:58030 On Wed, Oct 30, 2013 at 11:01 PM, Antoon Pardon wrote: > Because it is a pain in the ass. Now suddenly my program doesn't work > because I somehow inserted a tab instead of spaces. I broadly agree with your post (I'm of the school of thought that braces are better than indentation for delimiting blocks), but I don't think this argument holds water. All you need to do is be consistent about tabs OR spaces (and I'd recommend tabs, since they're simpler and safer), and you'll never have this trouble. Also, the parser should tell you if you mix tabs and spaces, so that won't trip anything either. ChrisA