Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!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.010 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'interpreter': 0.05; 'subject:Python': 0.05; 'tab': 0.07; 'expected.': 0.09; 'historically': 0.09; 'substitution': 0.09; 'am,': 0.12; 'declaration': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'indent': 0.16; 'narrow': 0.16; "wouldn't": 0.17; 'language,': 0.17; 'language': 0.17; 'wrote:': 0.18; 'assume': 0.22; 'header:In-Reply-To:1': 0.22; 'message-id:@mail.gmail.com': 0.28; 'nov': 0.29; 'can.': 0.30; 'equivalent': 0.31; 'quite': 0.32; 'break': 0.32; 'tue,': 0.32; 'pretty': 0.32; 'this.': 0.33; 'to:addr:python-list': 0.34; 'things': 0.34; 'anything': 0.34; 'trouble': 0.35; 'be.': 0.35; 'uses': 0.36; 'received:74.125': 0.37; 'received:google.com': 0.37; "there's": 0.37; 'think': 0.37; 'some': 0.38; 'finding': 0.39; 'should': 0.39; 'everyone': 0.39; 'to:addr:python.org': 0.40; 'once': 0.60; '2011': 0.61; 'your': 0.61; '29,': 0.73; 'spaces': 0.73; '11:54': 0.84; 'different.': 0.84; 'subject:Reference': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=ItGfTjPoCrnwOBCnc5sQWJ5aBZ5WtSbYxBygSCV6Gek=; b=ewT1qmjxMHM8VA6ngKyAIgOVZsFYSJKfJmeVdqvngBLBWbVAonIJCr58pa3WpMThjl 2AVby2wSe31ilowwxXg7LfNxMFAyJHCiwgc67TSnNoYHcm8PcjFU5Oh0CsRi8risbcXC upSn8Zut8KEg9rqI0rnX4eAA0KxTrTe5eaRVw= MIME-Version: 1.0 In-Reply-To: References: <79379487-0081-4067-92ed-c6717652e1ff@y7g2000vbe.googlegroups.com> <4eb0af60-26b3-45d5-8aff-566505003d6a@m10g2000vbc.googlegroups.com> <4ed2cddc$0$29988$c3e8da3$5496439d@news.astraweb.com> Date: Tue, 29 Nov 2011 12:49:49 +1100 Subject: Re: Using the Python Interpreter as a Reference 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.12 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: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1322531392 news.xs4all.nl 6851 [2001:888:2000:d::a6]:59800 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:16368 On Tue, Nov 29, 2011 at 11:54 AM, DevPlayer wrote: > To me, I would think the interpreter finding the coder's intended > indent wouldn't be that hard. And just make the need for consistant > spaces or tabs irrevelent simply by reformatting the indent as > expected. Pretty much all my text editors can. The trouble with having a language declaration that "a tab is equivalent to X spaces" is that there's no consensus as to what X should be. Historically X has always been 8, and quite a few programs still assume this. I personally like 4. Some keep things narrow with 2. You can even go 1 - a strict substitution of \t with \x20. Once you declare it in your language, you immediately break everyone who uses anything different. ChrisA