Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1a.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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; '(so': 0.07; 'fixes': 0.07; 'preference': 0.07; 'editor.': 0.09; 'expected.': 0.09; 'mixed': 0.09; 'spaces': 0.09; 'warn': 0.09; 'runs': 0.10; 'cc:addr:python- list': 0.11; 'mostly': 0.14; 'changes': 0.15; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'tabs': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'error': 0.23; 'adds': 0.24; 'align': 0.24; 'instance,': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'mix': 0.30; 'message- id:@mail.gmail.com': 0.30; 'code': 0.31; 'lines': 0.31; 'indentation': 0.31; 'sea': 0.31; 'seemingly': 0.31; 'another': 0.32; 'beginning': 0.33; 'bugs': 0.33; 'style': 0.33; 'screen': 0.34; 'received:google.com': 0.35; 'should': 0.36; 'two': 0.37; 'depends': 0.38; 'writes': 0.38; 'bad': 0.39; 'even': 0.60; "you'll": 0.62; 'personal': 0.63; 'such': 0.63; 'eight': 0.74; 'jul': 0.74; 'hard.': 0.84; 'edwards': 0.91; 'to:none': 0.92 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:cc :content-type; bh=2X7h6KxOpbaVhmqpOxBjZiL+7iG2CVBPOQP758K5Ahk=; b=cYFvBz3N/ZZ/rFtAxfo6yFhhyX5umlQRRsxwrSuBr153io+LtSrtfRH9SA67IwgFdb T6On/778JuFrj40GJQ9bp3yiFiIVCfEfqd6KpBM11CQ7j739IFmchRkb/+OJm9CkMjzk m9ita1Jvhx9DMcnqowBafTOXOECJgb0Ttnj69Hm+60+LRz9/RGv+DdV+SQAoXG1Iryc4 eIzWhCW3W31u5i2WlyFbEO2+OtOuwXzSZNyNnHyxW1WgyozoRlg5aZ6S2B7blBlbuJQr 58T3UMWzHrmMpYEwyh5Sp3LGxQAdxP2SC/cHx4Tsw/JwvYqD+K1KcZ4aNKkJ73mxQ3He XOFw== MIME-Version: 1.0 X-Received: by 10.58.245.194 with SMTP id xq2mr10087699vec.26.1404485910717; Fri, 04 Jul 2014 07:58:30 -0700 (PDT) In-Reply-To: <877g3tdvid.fsf@elektro.pacujo.net> References: <877g3tdvid.fsf@elektro.pacujo.net> Date: Sat, 5 Jul 2014 00:58:30 +1000 Subject: Re: PEP8 and 4 spaces From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1404485913 news.xs4all.nl 2905 [2001:888:2000:d::a6]:60645 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:73960 On Sat, Jul 5, 2014 at 12:54 AM, Marko Rauhamaa wrote: > Grant Edwards : > >> Definitely. Indenting with tabs vs. spaces is mostly personal >> preference (though spaces are better!). But, mixing the two is right >> out, and should be stomped on hard. > > Often one person writes the code and another person fixes bugs in it or > adds features to it. So if one uses tabs and the other refrains from > using them, you'll get the mixed style you abhor. > > Even if we accepted that to be bad style, there's nothing on the screen > that would warn against such usage: the lines seemingly align perfectly, > and the code runs as expected. That depends on your editor. SciTE, for instance, will give a warning any time indentation changes wrongly; if you mix tabs and spaces, there'll be error markers at the beginning of each change (so if there's one line with eight spaces amid a sea of tabs, that line and the one below it will be marked). ChrisA