Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed4a.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.014 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'detect': 0.07; 'test,': 0.07; 'editor.': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'columns': 0.16; 'considers': 0.16; 'finney': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:Line': 0.16; 'tab': 0.16; 'tabs': 0.16; 'wrote:': 0.18; 'do.': 0.18; 'header:User- Agent:1': 0.23; 'mon,': 0.24; 'question': 0.24; 'header:X -Complaints-To:1': 0.27; 'chris': 0.29; 'character': 0.29; 'characters': 0.30; 'dec': 0.30; 'especially': 0.30; 'code': 0.31; 'lines': 0.31; 'writes:': 0.31; 'agreed': 0.32; 'style': 0.33; 'could': 0.34; 'editor': 0.35; 'one,': 0.35; 'test': 0.35; 'but': 0.35; 'subject:?': 0.36; 'ben': 0.38; 'e.g.': 0.38; 'to:addr :python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'how': 0.40; 'wonderful': 0.60; 'hope': 0.61; 'browser': 0.61; 'making': 0.63; 'such': 0.63; 'more': 0.64; 'useful.': 0.68; 'counted,': 0.84; 'krish': 0.84; 'received:125': 0.84; 'subject:Using': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Ben Finney Subject: Re: Maintaining Maximum Line Length When Using Tabs Instead of Spaces? Date: Mon, 08 Dec 2014 15:47:20 +1100 References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: jigong.madmonks.org X-Public-Key-ID: 0xAC128405 X-Public-Key-Fingerprint: 517C F14B B2F3 98B0 CB35 4855 B8B2 4C06 AC12 8405 X-Public-Key-URL: http://www.benfinney.id.au/contact/bfinney-pubkey.asc X-Post-From: Ben Finney User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) Cancel-Lock: sha1:81JsdOkeLWvHUJq9WahhNSNNTj4= 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: 29 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1418014206 news.xs4all.nl 2976 [2001:888:2000:d::a6]:50104 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:82102 Chris Angelico writes: > On Mon, Dec 8, 2014 at 1:15 PM, Aahan Krish wrote: > > My question is to them (because I want to use tabs too) is: how do you > > maintain a line-length of 79 characters? > > > > E.g. scenario: The tab setting in your editor could be 2 or 4, and in > > other developer's browser it could be 8. The code will be longer than > > 79 chars in the latter's editor. > > Easy: You stop fretting about 79 characters. :) The question is a good one, especially when one considers the use of an automated test to detect lines which violate an agreed style guide. > If your policy is "lines are no more than 80-100 characters long", Such a policy still needs to know how many columns a U+0009 TAB character is to be counted, if an automated test is to be useful. You may not find value in such an automated “does this code meet the agreed style guide?” test, but many do. Perhaps the OP is one. -- \ “How wonderful that we have met with a paradox. Now we have | `\ some hope of making progress.” —Niels Bohr | _o__) | Ben Finney