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


Groups > comp.lang.python > #73919

Re: PEP8 and 4 spaces

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <tshepard@rcsreg.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.027
X-Spam-Evidence '*H*': 0.95; '*S*': 0.00; 'configure': 0.05; 'happens.': 0.09; 'lines.': 0.09; 'spaces': 0.09; 'used.': 0.09; 'will,': 0.09; 'changes': 0.15; 'advocating': 0.16; 'editor,': 0.16; 'fine.': 0.16; 'indent': 0.16; 'limiting': 0.16; 'mine.': 0.16; 'nudge': 0.16; 'pep8': 0.16; 'readable': 0.16; 'splitting': 0.16; 'tabs': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'do.': 0.18; 'trying': 0.19; 'things.': 0.19; 'putting': 0.22; 'saying': 0.22; 'to:name:python-list@python.org': 0.22; 'header:User-Agent:1': 0.23; 'char': 0.24; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'generally': 0.29; 'said,': 0.30; "i'm": 0.30; 'code': 0.31; 'lines': 0.31; 'about.': 0.31; 'fine,': 0.31; 'probably': 0.32; 'another': 0.32; 'quite': 0.32; 'sense': 0.34; 'could': 0.34; "can't": 0.35; 'received:209.85': 0.35; 'tool': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'really': 0.36; 'in.': 0.36; 'received:209': 0.37; 'received:10': 0.37; 'being': 0.38; 'handle': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'rather': 0.38; 'little': 0.38; 'short': 0.38; 'sure': 0.39; 'to:addr:python.org': 0.39; 'enough': 0.39; 'either': 0.39; 'space': 0.40; 'users': 0.40; 'how': 0.40; 'days': 0.60; 'most': 0.60; 'ago,': 0.61; 'length': 0.61; 'mentioned': 0.61; 'show': 0.63; 'such': 0.63; 'july': 0.63; 'different': 0.65; 'great': 0.65; 'worth': 0.66; 'feeling': 0.68; 'lose': 0.68; 'received:10.10': 0.74; 'factoring': 0.84; 'gospel': 0.84; 'received:10.10.10': 0.84; 'tolerate': 0.84; 'good,': 0.91
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=WjQRiN+h41CKBOudSp9HMNI/e2uiR3lFtiyz9DvX+Jg=; b=lAOXWf69vYNO2hPzngnVMPt3EMmCFf0TWOy36mnR81bBMcgQYfWdaafuj/xLcw6pXX cUwwXP5sZ/xeAE38HhCvfihQKaiLICtfLUPD8SQJScNtiUE2EXQ+F51Ys/ayDgb+6k05 e2u4YMHqgAiZd8wnXVDWdD90YScsTn0QMOUArkxdJfXAGmr3q0PAnEqICCXFDzfMDskJ t3z+iSGvcK6R0Fnm9DnnROuCubtLlCXXnHtugH6N+FtSwmUqlatpiYf/14WzrqVXqPFa +6wZW5K68/rWBgKF2wqm2++LMr+d8QvNXdwB3coHMg1DGLHm/Osulctca8i0MwNGEk+e KWPQ==
X-Gm-Message-State ALoCoQnOQnDi/kOBOIf84ckmhT/PeQBrBswmlMJwlKerAcVdSDq4YAcmxvuXIsqBC3ye6kq+Gz2r
X-Received by 10.68.191.138 with SMTP id gy10mr31701691pbc.169.1404418912733; Thu, 03 Jul 2014 13:21:52 -0700 (PDT)
Date Thu, 03 Jul 2014 13:21:51 -0700
From Toby Shepard <tshepard@rcsreg.com>
User-Agent Mozilla/5.0 (X11; Linux i686 on x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0
MIME-Version 1.0
To "python-list@python.org" <python-list@python.org>
Subject Re: PEP8 and 4 spaces
References <53B59358.2040404@tobiah.org> <8871383c-4961-4004-83f1-949cabf16ff9@email.android.com>
In-Reply-To <8871383c-4961-4004-83f1-949cabf16ff9@email.android.com>
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
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.11470.1404418922.18130.python-list@python.org> (permalink)
Lines 47
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1404418922 news.xs4all.nl 2950 [2001:888:2000:d::a6]:56835
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:73919

Show key headers only | View raw


On 07/03/2014 12:44 PM, Simon Ward wrote:
>
>
> On 3 July 2014 18:31:04 BST, 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.
>
> This isn't worth arguing about.

How point of view changes things.

>
>> Anyway, I gave up the 80 char line length long ago, having little
>> feeling for some dolt on a Weiss terminal that for some reason
>> needs to edit my code.
>
> Putting the code factoring considerations aside, because others have
> already mentioned them and I'm sure others will, there are some other
> practical reasons for limiting line width:

All that is fine, and makes great sense.  I generally write short lines.
I know the tricks for splitting otherwise long lines into multiple readable
lines.  I'm not advocating that we use semicolons and always go past 80
characters.  I'm just saying that once in a while it makes sense to me
to do it, and I don't lose sleep when it happens.
  
>> I feel rather the same about the spaces and tabs, given that most
>> people seem to be using editors these days that are configurable to
>> show tabs a four characters.
>
> Conversely, those same editors can probably automatically indent and
> unindent a configurable amount of spaces. If you don't use such an
> editor, and you really can't tolerate the different style, you can
> use another tool to reindent your code.

It works both ways.  I'm using Vim, and it will handle the spaces
and give a tab-like experience - not quite as good, but good enough
to live with.  Either of us could give in.  The boss likes tabs,
as I do.  The coworker really only has PEP8 to point to.  There is
really nothing good about the space way, other than as I said, Notepad
users will see four space indents.  Most other users can configure the tabstop
as they like *if* tabs are being used.  The Notepad users will get by just fine.

It could fall either way.  I was just trying to nudge it toward mine.

Tobiah

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


Thread

Re: PEP8 and 4 spaces Toby Shepard <tshepard@rcsreg.com> - 2014-07-03 13:21 -0700

csiph-web