Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed2a.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.052 X-Spam-Evidence: '*H*': 0.90; '*S*': 0.00; 'editor.': 0.09; 'cc:addr :python-list': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'limit,': 0.16; 'limit.': 0.16; 'silly': 0.16; 'subject:Line': 0.16; 'tab': 0.16; 'tabs': 0.16; 'wrote:': 0.18; 'rules': 0.22; 'cc:addr:python.org': 0.22; 'mon,': 0.24; '(or': 0.24; 'question': 0.24; 'cc:2**0': 0.24; 'sort': 0.25; 'header:In- Reply-To:1': 0.27; 'characters': 0.30; 'dec': 0.30; 'message- id:@mail.gmail.com': 0.30; 'code': 0.31; 'lines': 0.31; 'stuff': 0.32; 'run': 0.32; 'could': 0.34; 'editor': 0.35; 'received:google.com': 0.35; 'subject:?': 0.36; 'e.g.': 0.38; 'pm,': 0.38; 'sure': 0.39; 'how': 0.40; 'even': 0.60; 'break': 0.61; 'lower': 0.61; 'browser': 0.61; 'more': 0.64; 'between': 0.67; 'policy.': 0.68; 'krish': 0.84; 'subject:Using': 0.84; '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=P+J8oIK9S5Hc+kFhKlIwZiLZq8KeOy1V1n04+RafExk=; b=XDTaFDEIC+cDZD48WTkFTpaAFhjFFresWcpHNJZusJ8KS5kix4O3P70D2W+s5Mb4XP JVhb9TPgxKZq89PTiuVby3ZuvpdPvSc6Nf6+iCfnPUf347eYLsB0KOveButRo1sYkjP2 YTETofta1RUGz6KPLNje3CVToLOOnUmuTVf37DAVgMuJOkM/AHlfb+bWwhXyF4lTryDW ImEIjEkpTFtdGtwaHjOaY8eqic3o/eBcZk8itLGdotGSYpkj6kJ/z3O19B1OZauWryh6 UlERrt++E1MkxaIJBsDnfDDgPm/C08+8kGagAXl0M3n7x6QFLVlnHgeuZSAJ/3GYPG9m PH2g== MIME-Version: 1.0 X-Received: by 10.50.152.104 with SMTP id ux8mr12577694igb.14.1418005404510; Sun, 07 Dec 2014 18:23:24 -0800 (PST) In-Reply-To: References: Date: Mon, 8 Dec 2014 13:23:24 +1100 Subject: Re: Maintaining Maximum Line Length When Using Tabs Instead of 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: 1418005407 news.xs4all.nl 2915 [2001:888:2000:d::a6]:48973 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:82093 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. :) If your policy is "lines are no more than 80-100 characters long", then the difference between 4-space tabs and 8-space won't break stuff unless it was already marginal. So if you run 4-space (or 2-space) indentation, you just make sure you keep your lines to the lower end of the limit. Even better, don't quibble about any sort of specific limit, and just have a policy of "don't make stuff so long that it's unreadable, and don't put silly arbitrary rules on your programmers". That's my policy. ChrisA