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


Groups > comp.lang.python > #73913

Re: PEP8 and 4 spaces

Date 2014-07-03 21:07 +0300
From Paul Sokolovsky <pmiscml@gmail.com>
Subject Re: PEP8 and 4 spaces
References <53B59358.2040404@tobiah.org> <CAPTjJmqv_-89sV+X3VX03yAEXT43RgfBbcYL0W3GOLRCWGwYjQ@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.11466.1404410853.18130.python-list@python.org> (permalink)

Show all headers | 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