Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #73913

Re: PEP8 and 4 spaces

Path csiph.com!usenet.pasdenom.info!news.franciliens.net!fdn.fr!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <pmiscml@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.040
X-Spam-Evidence '*H*': 0.92; '*S*': 0.00; '*not*': 0.07; 'pep': 0.09; 'spaces': 0.09; 'violates': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'nowadays': 0.16; 'pep8': 0.16; 'rules.': 0.16; 'settings,': 0.16; 'tabs': 0.16; 'wrote:': 0.18; 'meant': 0.20; 'cc:addr:python.org': 0.22; 'paul': 0.24; 'looks': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'am,': 0.29; 'code': 0.31; 'indentation': 0.31; 'python).': 0.31; 'up:': 0.31; 'quite': 0.32; 'fri,': 0.33; 'problem': 0.35; 'display': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'surely': 0.36; 'doing': 0.36; 'charset:us-ascii': 0.36; 'so,': 0.37; 'convention': 0.38; 'whatever': 0.38; 'how': 0.40; 'most': 0.60; 'email addr:gmail.com': 0.63; 'different': 0.65; 'account': 0.65; 'to:addr:gmail.com': 0.65; 'prohibited': 0.69; 'jul': 0.74; 'gospel': 0.84; 'picture.': 0.84; '+1000': 0.91; 'beings': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=MzRxJOyQLcEN6dHaKqylLWwXyx6OLgjs7SRoHEcLSw4=; b=0cuq+QRk3g3T+UCATmEJILEXdv/6lKuuYcjZo1afhWPVFOjxAJCjVz4DzRty2MP0MG 57BTvWYhauFDhbTCM9+sA1Lm+VUXBmkOamAW8jJDj/pvxvXOg4JJ1SPUkKH+gemtzGtr IKV5BNVRRd998w9w4WlTqn3a7YqfDqEPG9GqQvwmnM2ezMBPyiqUtEv5Dh95KZCeOAe/ 7OVJpVNaKXv5h5sgLSGueV4BtfqcMk91srckAFvoGACKKwJFrNGL7XnamjA842KVyLj1 CjB6WYxi3fB79Iire1MctOoFIy7NEZZfytf6FuE89gr+EmUZ8VwonEDG323ZLBVIHtMn mDWw==
X-Received by 10.152.10.40 with SMTP id f8mr1930981lab.75.1404410851939; Thu, 03 Jul 2014 11:07:31 -0700 (PDT)
Date Thu, 3 Jul 2014 21:07:28 +0300
From Paul Sokolovsky <pmiscml@gmail.com>
To Chris Angelico <rosuav@gmail.com>
Subject Re: PEP8 and 4 spaces
In-Reply-To <CAPTjJmqv_-89sV+X3VX03yAEXT43RgfBbcYL0W3GOLRCWGwYjQ@mail.gmail.com>
References <53B59358.2040404@tobiah.org> <CAPTjJmqv_-89sV+X3VX03yAEXT43RgfBbcYL0W3GOLRCWGwYjQ@mail.gmail.com>
X-Mailer Claws Mail 3.10.1 (GTK+ 2.24.10; i686-pc-linux-gnu)
MIME-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
Cc "python-list@python.org" <python-list@python.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.11466.1404410853.18130.python-list@python.org> (permalink)
Lines 32
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1404410853 news.xs4all.nl 2943 [2001:888:2000:d::a6]:34933
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:73913

Show key headers only | View raw


Hello,

On Fri, 4 Jul 2014 03:38:27 +1000
Chris Angelico <rosuav@gmail.com> wrote:

> On Fri, Jul 4, 2014 at 3:31 AM, Tobiah <tshepard@rcsreg.com> wrote:
> > Coworker takes PEP8 as gospel and uses 4 spaces
> > to indent.  I prefer tabs.  Boss want's us to
> > unify.
> 
> 1) PEP 8 is meant to be guidelines, *not* a set of hard-and-fast
> rules. 
> 2) Tabs let different people display the indents at different
> widths. 

That's exactly the problem with tabs - whatever you think your code
looks like with tabs, other people will see quite different picture.

Also, most people are not interested in doing mumbo-jumbo with tabs
settings, and have them set to standard 8-char tabs. So, any python
code which uses only tabs for indentation automatically violates
4-space convention (and mixing tabs and spaces is nowadays prohibited
in Python).

Summing up: if you care about other human beings, use spaces. If you
don't care about other human beings, you may use tabs, but other human
beings surely will take how you treat them into account ;-).


-- 
Best regards,
 Paul                          mailto:pmiscml@gmail.com

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: PEP8 and 4 spaces Paul Sokolovsky <pmiscml@gmail.com> - 2014-07-03 21:07 +0300
  Re: PEP8 and 4 spaces wxjmfauth@gmail.com - 2014-07-03 12:22 -0700
  Re: PEP8 and 4 spaces Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-07-04 01:21 +0000
    Re: PEP8 and 4 spaces Chris Angelico <rosuav@gmail.com> - 2014-07-04 11:30 +1000
      Re: PEP8 and 4 spaces Roy Smith <roy@panix.com> - 2014-07-03 21:37 -0400
    Re: PEP8 and 4 spaces Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-07-04 18:55 +1200
      Re: PEP8 and 4 spaces Lie Ryan <lie.1296@gmail.com> - 2014-07-04 19:29 +0100
        Re: PEP8 and 4 spaces Roy Smith <roy@panix.com> - 2014-07-04 15:04 -0400
          Re: PEP8 and 4 spaces Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-07-04 20:50 +0100
        Re: PEP8 and 4 spaces Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-07-05 11:17 +1200
          Re: PEP8 and 4 spaces Tim Chase <python.list@tim.thechases.com> - 2014-07-04 18:35 -0500
      Re: PEP8 and 4 spaces Travis Griggs <travisgriggs@gmail.com> - 2014-07-05 00:51 -0700

csiph-web