Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.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.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'problem?': 0.07; 'pep': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'spaces': 0.09; 'foo,': 0.16; 'pep8': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'received:zen.co.uk': 0.16; 'tabs': 0.16; 'wrote:': 0.18; 'code.': 0.18; '>>>': 0.22; 'header :User-Agent:1': 0.23; 'looks': 0.24; 'source': 0.25; 'header:X -Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'mix': 0.30; 'code': 0.31; "d'aprano": 0.31; 'steven': 0.31; 'quite': 0.32; 'style': 0.33; 'problem': 0.35; 'method': 0.36; 'whatever': 0.38; 'to:addr:python-list': 0.38; 'issue': 0.38; 'to:addr:python.org': 0.39; 'either': 0.39; 'received:org': 0.40; 'first': 0.61; 'fashion': 0.64; 'different': 0.65; 'alone.': 0.84; 'picture.': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Lie Ryan Subject: Re: PEP8 and 4 spaces Date: Fri, 04 Jul 2014 19:29:35 +0100 References: <53B59358.2040404@tobiah.org> <53b6019f$0$29985$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: 82-69-92-136.dsl.in-addr.zen.co.uk User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: 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: 1404498596 news.xs4all.nl 2893 [2001:888:2000:d::a6]:33145 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:73974 On 04/07/14 07:55, Gregory Ewing wrote: > Steven D'Aprano wrote: > >>> That's exactly the problem with tabs - whatever you think your code >>> looks like with tabs, other people will see quite different picture. >> >> Why do you consider this a problem? > > It's a problem if you try to use tabs for lining things > up in a tabular fashion in your source code. > > The solution is not to use tabs for that -- only use > tabs for indentation, and use spaces for everything > else. Or, as PEP 8 suggests, don't try to line things > up in the first place. PEP8 suggests using this style of method invocation: obj.method(foo, bar, baz) which is an effect impossible to do correctly with tabs alone. If you want to follow this style strictly, you end up having to either mix tabs and spaces, or just use spaces, or as I prefer it, avoid the issue altogether: obj.method( foo, bar, baz, )