Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin3!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed3.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.020 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'configure': 0.05; 'subject:Python': 0.06; 'pep': 0.09; 'spaces': 0.09; 'whole.': 0.09; 'python': 0.11; '"python': 0.16; '...because': 0.16; 'better?': 0.16; 'decision,': 0.16; 'editor,': 0.16; 'hint': 0.16; 'process?': 0.16; 'q1.': 0.16; 'q2.': 0.16; 'reads,': 0.16; 'tab': 0.16; 'tabs': 0.16; 'whatsoever': 0.16; 'example': 0.22; 'programming': 0.22; 'preferred': 0.22; '(or': 0.24; 'feature': 0.29; 'character': 0.29; 'message-id:@mail.gmail.com': 0.30; 'indentation': 0.31; "user's": 0.31; 'another': 0.32; '(i.e.': 0.33; 'development.': 0.33; 'programmers': 0.33; 'core': 0.34; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'really': 0.36; 'subject:?': 0.36; 'so,': 0.37; 'two': 0.37; 'system,': 0.38; 'thank': 0.38; 'displays': 0.38; 'initially': 0.38; 'question,': 0.38; 'to:addr:python-list': 0.38; 'url:01': 0.39; "couldn't": 0.39; 'itself': 0.39; 'url:2012': 0.39; 'to:addr:python.org': 0.39; 'according': 0.40; 'how': 0.40; 'read': 0.60; 'most': 0.60; 'affect': 0.61; 'length': 0.61; 'kindly': 0.61; 'simply': 0.61; 'maximum': 0.63; 'debate': 0.68; 'difficulty': 0.68; 'subject: & ': 0.68; 'caused': 0.69; 'url:me': 0.69; 'them)': 0.84; 'mr.': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aahan.me; s=aahan-me; h=mime-version:date:message-id:subject:from:to:content-type; bh=4AQXX8fbUdYZnA5FmKbgvLxxylGuoVqu53qDYr9fAJk=; b=Ta0War8cua0vdFMUJN59Fo9mTc6KKYrioNDBFEMLBDd2djoAlUpc2F7muE53RM61oe ZdxFdJIv+fG4XEuy6p7tSYwRXixDPwOAYFX35dU+Up0xuDPz8B65WURk8vTp0UPVgEhn N5PDAOdJx4OR+ybPloGR5i/hdS3ssAbfLk3BA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=4AQXX8fbUdYZnA5FmKbgvLxxylGuoVqu53qDYr9fAJk=; b=NheTsWhEFOGmJIbccw2LoCxBg9B4jfOFbph4EcFNL5oIUlNRVAeJHccaxHR3NbF9Ki TVQcJJI0/uU/mbXuaAUhMlabEkkObC2nC6cZ2bI+dwTzk6xOgd0HEAi/NPpjcelki5VP HiygyAUZgpFmMVsMkYWpbdS4mgzRJ4ihpaJdRrknU2OTlVIvNdk2TyNZVbarK2sKfSOq IXbNDQEoJ5h4idUxi69v9O4W/msX6UA5T8BFFLF8sjxIWlsAhUlYtTMf5nJJSOih8JPq 7eDlFAyERj201Lp9TgRrhy1/hF2a0MMvs57Q9R9t1FaUEudIUyh34sXo0n6yLbCQkAd+ 6tRA== X-Gm-Message-State: ALoCoQmMiMkYhmpmLHVOIRnnjcHlXSnRAXbsfIcF4B+1jlYjZblWO8vUdpOqDXZJPuH+KxMzA3zz MIME-Version: 1.0 X-Received: by 10.170.189.71 with SMTP id g68mr23616651yke.23.1417801247225; Fri, 05 Dec 2014 09:40:47 -0800 (PST) X-Originating-IP: [106.51.206.241] Date: Fri, 5 Dec 2014 17:40:47 +0000 Subject: Tabs for indentation & Spaces for alignment in Python 3? From: Aahan Krish To: python-list@python.org Content-Type: multipart/alternative; boundary=001a11398856b40e2e05097b933b 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: 73 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1417801617 news.xs4all.nl 2917 [2001:888:2000:d::a6]:57685 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:82011 --001a11398856b40e2e05097b933b Content-Type: text/plain; charset=UTF-8 I have two general questions regarding Python that I couldn't find any good answers for. This is not the often-asked Tabs vs Spaces question, so kindly read it in whole. *Q1.* This is not to debate the decision, but I really wanted to know the reason why PEP 8 chose to go with spaces instead of tabs. I read that tabs were initially preferred over spaces (esp. Mr. Rossum)? What caused the decision that spaces are better? According to Core Python Programming (Book): ...because tabs vary in the number of spaces depending on your system, we > recommend not using tabs if there is any hint of cross-platform development. > Isn't that a feature of tabs? (i.e. allowing the user to configure the size of a tab stop in his editor, which has no affect whatsoever on the tab character itself or how it displays in another user's editor.) Is it the difficulty to adhere to the Maximum Line Length (79) when using tabs? or is it simply because most of the Python programmers were using spaces (or were adamant on using them) at the time of the decision-making process? *Q2.* PEP 8 also reads, "Python 3 disallows mixing the use of tabs and spaces for indentation." So, if I am using tabs for indentation and spaces for alignment, is it still considered "mixing the use of tabs and spaces" in Python 3? (Please see this example .) Thank you very much for your time! Best Aahan --001a11398856b40e2e05097b933b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I have two general questions regarding Python that I could= n't find any good answers for. This is not the often-asked Tabs vs Spac= es question, so kindly read it in whole.

Q1. This is not to d= ebate the decision, but I really wanted to know the reason why PEP 8 chose = to go with spaces instead of tabs. I read that tabs were initially preferre= d over spaces (esp. Mr. Rossum)? What caused the decision that spaces are b= etter?

According to Core Python Programming (Book):

...because tabs vary in the number= of spaces depending on your system, we recommend not using tabs if there i= s any hint of cross-platform development.

Isn't tha= t a feature of tabs? (i.e. allowing the user to configure the size of a tab= stop in his editor, which has no affect whatsoever on the tab character it= self or how it displays in another user's editor.)

Is it the dif= ficulty to adhere to the Maximum Line Length (79) when using tabs? or is it= simply because most of the Python programmers were using spaces (or were a= damant on using them) at the time of the decision-making process?

Q2. PEP 8 also reads, "Python 3 disallows mixing the use of tabs = and spaces for indentation."

So, if I am using tabs for indenta= tion and spaces for alignment, is it still considered "mixing the use = of tabs and spaces" in Python 3? (Please see this example.)
Thank you very much for your time!


Best
Aahan
=
--001a11398856b40e2e05097b933b--