Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder3.xlned.com!news2.euro.net!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.013 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'configure': 0.05; 'insert': 0.05; 'spaces': 0.09; 'width': 0.09; '*key*': 0.16; 'fine.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'implies': 0.16; 'sure.': 0.16; 'tab': 0.16; 'tabs': 0.16; 'tweak': 0.16; 'do,': 0.16; 'wrote:': 0.18; 'wed,': 0.18; '>>>': 0.22; 'stick': 0.24; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'am,': 0.29; 'mix': 0.30; 'message- id:@mail.gmail.com': 0.30; 'received:209.85': 0.35; 'editor': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'add': 0.35; 'next': 0.36; 'should': 0.36; 'received:209': 0.37; 'to:addr :python-list': 0.38; 'to:addr:python.org': 0.39; "you're": 0.61; 'real': 0.63; 'subject:there': 0.68; "today's": 0.70; 'eight': 0.74; 'otten': 0.84; 'safe.': 0.84; '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=Yzq1sM2Aw7HFpl57S13Q6G4B+dXb88HgHgNoSMwz1uY=; b=iLGrSwZ2oTKURZkfY6s8AokRKokviiJnxkngiAqLyC9K5FJN/thK1c1cqGlfTVsRxv s3jbGI/8Eg6SPqoqjuUdpQeWLYcWEW2UjGKobwMyEdtENwBAZhyJQKfDa+0JqWtWaXjY wJ+qdLkX/7o3tSrLr8la15CFXDxEh6Rgvmf1pum3Lo+4T5mf/ZXn4M+psJGRspEHktJ8 PjlijtW6jY1SmvETm3jIrkh6HGR5LKnKSrP6EteFvb7qih2Tho11awSduYi0kkPKl/XE I06uR/oHEnZ+Yx2p+HQuKn7lWTD1WNBfhllRdPLybv+i8BBtOxa/NNv5f+pFK2B/R7xR 7hVg== MIME-Version: 1.0 X-Received: by 10.66.190.104 with SMTP id gp8mr2302743pac.84.1369814370422; Wed, 29 May 2013 00:59:30 -0700 (PDT) In-Reply-To: References: Date: Wed, 29 May 2013 17:59:30 +1000 Subject: Re: IndentationError: expected an indented block but it's there 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: 21 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1369814374 news.xs4all.nl 15913 [2001:888:2000:d::a6]:41182 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:46359 On Wed, May 29, 2013 at 2:53 AM, Peter Otten <__peter__@web.de> wrote: > Chris Angelico wrote: > >> On Wed, May 29, 2013 at 2:19 AM, Peter Otten <__peter__@web.de> wrote: >>> Solution: configure your editor to use four spaces for indentation. >> >> ITYM eight spaces. > > I meant: one hit of the Tab key should add spaces up to the next multiple of > four. Which implies > >> But the real solution is to not mix tabs and >> spaces. Stick to one or the other and you're safe. Sure. If you configure your tab *key* to not insert a tab *character*, then you're fine. Or alternatively, if you always use \t for indentation, you can tweak the displayed width of it. (Or, as I do, just let it be eight wide. On today's screens that's not much of a problem.) ChrisA