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


Groups > comp.lang.python > #74002

Re: PEP8 and 4 spaces

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.004
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; '(at': 0.04; 'definitions': 0.07; 'dan': 0.09; 'naturally': 0.09; 'cc:addr:python-list': 0.11; 'ah,': 0.16; 'bit.': 0.16; 'definitions,': 0.16; 'docstrings': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'line),': 0.16; 'nesting': 0.16; 'newlines': 0.16; 'pairs': 0.16; 'top-level': 0.16; 'url:pep-0008': 0.16; 'url:peps': 0.16; 'whitespace.': 0.16; 'wrote:': 0.18; 'separate': 0.22; 'cc:addr:python.org': 0.22; 'space.': 0.24; 'url:dev': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'chris': 0.29; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; '(maybe': 0.31; 'comments,': 0.31; 'horizontal': 0.31; 'class': 0.32; 'probably': 0.32; 'quite': 0.32; 'url:python': 0.33; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'url:org': 0.36; 'should': 0.36; 'two': 0.37; 'that,': 0.38; 'anything': 0.39; 'either': 0.39; 'how': 0.40; 'blank': 0.60; "you're": 0.61; 'more': 0.64; 'between': 0.67; 'jul': 0.74; 'extras': 0.84; 'much,': 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=r3UsqDzGsrHVZJRYVWuxQnEbqNqexCfKOPjbs7RZ0/w=; b=XRJv6kTcIF1ca/TFZ88xF2cYZIwo03eqcu724XHPqSE3eu9cN2GXYvA4kC3KUjZvAI qMIc4iTKTqbaqZEpPTco0GCp0+CkBG1WOvueU4JoWm7SzfawvtEKbdFSoo2tG6sQnIsD UnUfrb1qW+nlApBMPIQ8IY+gPfEg4Sfuzya3+tE8riHWJ8RRYdksZYNOfMdzfzIk89g0 hw9xx52m4sUNpEc/f8PsirSN+VHNo+x5pQGqKf04cQDHjG8MwkZ8TdvroqgY0B+t7YO3 itSpxzyIWJ2cN7+bPNMH8Z2tzCviMyI35xi4testcAXcB1ozZ63h+R/WFqes/kq9RK8Z j9Nw==
MIME-Version 1.0
X-Received by 10.220.53.72 with SMTP id l8mr18602394vcg.16.1404610101770; Sat, 05 Jul 2014 18:28:21 -0700 (PDT)
In-Reply-To <lpa85c$jca$1@dont-email.me>
References <mailman.11462.1404408676.18130.python-list@python.org> <22220d8c-af69-434b-9361-520e396e615e@googlegroups.com> <CALwzid=_7K3EdvY73ZFfDaffnmm3rAf853-+sgFv-o+rE0YJ9A@mail.gmail.com> <mailman.11533.1404602889.18130.python-list@python.org> <lpa85c$jca$1@dont-email.me>
Date Sun, 6 Jul 2014 11:28:21 +1000
Subject Re: PEP8 and 4 spaces
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <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 <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.11534.1404610110.18130.python-list@python.org> (permalink)
Lines 25
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1404610110 news.xs4all.nl 2892 [2001:888:2000:d::a6]:53811
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:74002

Show key headers only | View raw


On Sun, Jul 6, 2014 at 11:18 AM, Dan Sommers <dan@tombstonezero.net> wrote:
> On Sun, 06 Jul 2014 09:27:59 +1000, Chris Angelico wrote:
>
>> How often do you ever have multiple consecutive blank lines? My
>> newlines are either single (line end) or in pairs (one blank line),
>> and I don't remember having anything else (at least, not
>> intentionally). Greater separation than a blank line is provided by
>> comments, not more whitespace.
>>
>> ChrisA
>
> http://legacy.python.org/dev/peps/pep-0008/#id15 says:  "Separate top-level
> function and class definitions with two blank lines."
>
> With docstrings occurring inside function definitions, this happens quite a
> bit.

Ah, okay. Still, it's not something that scales up much, the way
horizontal whitespace does. You go to 2 blanks, and extras (sparingly)
between groups, but it's not like indentation, where nesting naturally
requires progressively more space. If you're nesting groups of
functions like that, you probably should be using something other than
whitespace (maybe separate files?).

ChrisA

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


Thread

PEP8 and 4 spaces Tobiah <tshepard@rcsreg.com> - 2014-07-03 10:31 -0700
  Re: PEP8 and 4 spaces Roy Smith <roy@panix.com> - 2014-07-03 13:46 -0400
  Re: PEP8 and 4 spaces Grant Edwards <invalid@invalid.invalid> - 2014-07-03 19:02 +0000
    Re: PEP8 and 4 spaces Tim Chase <python.list@tim.thechases.com> - 2014-07-03 14:40 -0500
      Re: PEP8 and 4 spaces Tobiah <toby@tobiah.org> - 2014-07-03 14:23 -0700
        Re: PEP8 and 4 spaces Emile van Sebille <emile@fenx.com> - 2014-07-03 16:15 -0700
          Re: PEP8 and 4 spaces Grant Edwards <invalid@invalid.invalid> - 2014-07-04 14:28 +0000
            Re: PEP8 and 4 spaces Marko Rauhamaa <marko@pacujo.net> - 2014-07-04 17:54 +0300
              Re: PEP8 and 4 spaces Chris Angelico <rosuav@gmail.com> - 2014-07-05 00:58 +1000
              Re: PEP8 and 4 spaces Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-07-04 16:00 +0100
                Re: PEP8 and 4 spaces Marko Rauhamaa <marko@pacujo.net> - 2014-07-04 18:12 +0300
              Re: PEP8 and 4 spaces Simon Ward <simon+python@bleah.co.uk> - 2014-07-04 19:52 +0100
              Re: PEP8 and 4 spaces Michael Torrie <torriem@gmail.com> - 2014-07-05 16:03 -0600
              Re: PEP8 and 4 spaces Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-07-05 23:50 +0100
            Re: PEP8 and 4 spaces Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-07-04 15:57 +0100
            Re: PEP8 and 4 spaces Emile van Sebille <emile@fenx.com> - 2014-07-04 08:57 -0700
            Re: PEP8 and 4 spaces Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-07-04 17:06 +0100
              Re: PEP8 and 4 spaces Maciej Dziardziel <fiedzia@gmail.com> - 2014-07-04 09:19 -0700
                Re: PEP8 and 4 spaces Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-07-04 16:56 +0000
    Re: PEP8 and 4 spaces Tobiah <toby@tobiah.org> - 2014-07-03 14:28 -0700
  Re: PEP8 and 4 spaces Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-07-04 01:02 +0000
    Re: PEP8 and 4 spaces Chris Angelico <rosuav@gmail.com> - 2014-07-04 11:19 +1000
    Re: PEP8 and 4 spaces Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-07-04 18:35 +1200
      Re: PEP8 and 4 spaces wxjmfauth@gmail.com - 2014-07-04 01:47 -0700
        Re: PEP8 and 4 spaces Marko Rauhamaa <marko@pacujo.net> - 2014-07-04 12:21 +0300
          Re: PEP8 and 4 spaces wxjmfauth@gmail.com - 2014-07-04 03:10 -0700
      Re: PEP8 and 4 spaces Roy Smith <roy@panix.com> - 2014-07-04 09:47 -0400
        Re: PEP8 and 4 spaces Mihamina Rakotomandimby <mihamina.rakotomandimby@rktmb.org> - 2014-07-04 16:59 +0300
        Re: PEP8 and 4 spaces Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-07-04 16:12 +0100
        Re: PEP8 and 4 spaces George Silva <georger.silva@gmail.com> - 2014-07-04 12:14 -0300
          Re: PEP8 and 4 spaces Roy Smith <roy@panix.com> - 2014-07-04 12:31 -0400
            Re: PEP8 and 4 spaces George Silva <georger.silva@gmail.com> - 2014-07-04 13:37 -0300
        Re: PEP8 and 4 spaces Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-07-05 11:14 +1200
  Re: PEP8 and 4 spaces Rick Johnson <rantingrickjohnson@gmail.com> - 2014-07-04 19:00 -0700
    Re: PEP8 and 4 spaces Rick Johnson <rantingrickjohnson@gmail.com> - 2014-07-04 19:47 -0700
      Re: PEP8 and 4 spaces Chris Angelico <rosuav@gmail.com> - 2014-07-05 13:03 +1000
      Re: PEP8 and 4 spaces Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-07-05 20:57 +1200
        Re: PEP8 and 4 spaces alister <alister.nospam.ware@ntlworld.com> - 2014-07-05 09:48 +0000
      OT: Flashlights [was Re: PEP8 and 4 spaces] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-07-05 10:15 +0000
        Re: OT: Flashlights [was Re: PEP8 and 4 spaces] Rick Johnson <rantingrickjohnson@gmail.com> - 2014-07-06 08:41 -0700
          Re: OT: Flashlights [was Re: PEP8 and 4 spaces] Chris Angelico <rosuav@gmail.com> - 2014-07-07 08:25 +1000
    Re: PEP8 and 4 spaces Ian Kelly <ian.g.kelly@gmail.com> - 2014-07-05 12:57 -0600
      Re: PEP8 and 4 spaces Roy Smith <roy@panix.com> - 2014-07-05 15:07 -0400
    Re: PEP8 and 4 spaces Robert Kern <robert.kern@gmail.com> - 2014-07-05 21:07 +0100
    Re: PEP8 and 4 spaces Chris Angelico <rosuav@gmail.com> - 2014-07-06 09:27 +1000
      Re: PEP8 and 4 spaces Dan Sommers <dan@tombstonezero.net> - 2014-07-06 01:18 +0000
        Re: PEP8 and 4 spaces Chris Angelico <rosuav@gmail.com> - 2014-07-06 11:28 +1000

csiph-web