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


Groups > comp.lang.python > #74066

Re: PEP8 and 4 spaces

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'syntax': 0.04; 'warnings': 0.04; 'anymore.': 0.09; 'dan': 0.09; 'makefile': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'spaces': 0.09; '\xe2\x80\x94': 0.09; 'python': 0.11; 'better:': 0.16; 'choice,': 0.16; 'finney': 0.16; 'irrevocable': 0.16; 'nevertheless': 0.16; 'pep8': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'semantically': 0.16; 'slight': 0.16; 'tab': 0.16; 'tabs': 0.16; ':-)': 0.16; 'all.': 0.16; 'ignore': 0.16; 'code.': 0.18; 'examples': 0.20; 'code,': 0.22; 'example': 0.22; 'header:User-Agent:1': 0.23; 'source': 0.25; 'nearly': 0.26; 'header:X-Complaints-To:1': 0.27; 'idea': 0.28; 'character': 0.29; 'characters': 0.30; 'along': 0.30; "i'm": 0.30; 'breaking': 0.31; 'writes:': 0.31; 'beginning': 0.33; "can't": 0.35; 'editor': 0.35; 'but': 0.35; 'there': 0.35; 'effort': 0.37; 'wrong': 0.37; 'ben': 0.38; 'handle': 0.38; 'to:addr:python-list': 0.38; 'files': 0.38; 'does': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'changed': 0.39; 'received:org': 0.40; 'space': 0.40; 'how': 0.40; 'further': 0.61; 'reach': 0.63; 'choose': 0.64; 'different': 0.65; 'finally': 0.65; 'fact,': 0.69; 'miss': 0.74; '\xe2\x80\x93': 0.77; 'kennedy': 0.84; 'received:125': 0.84; 'terrible': 0.84; '\xe2\x80\x9cthe': 0.91
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Ben Finney <ben@benfinney.id.au>
Subject Re: PEP8 and 4 spaces
Date Mon, 07 Jul 2014 11:00:59 +1000
References <53B59358.2040404@tobiah.org> <CAGGBd_rOg+EX1OxryW9-6+2b6yqzzKL9xN1K7+TPSP77tJz=bQ@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 8bit
X-Gmane-NNTP-Posting-Host jigong.madmonks.org
X-Public-Key-ID 0xAC128405
X-Public-Key-Fingerprint 517C F14B B2F3 98B0 CB35 4855 B8B2 4C06 AC12 8405
X-Public-Key-URL http://www.benfinney.id.au/contact/bfinney-pubkey.asc
X-Post-From Ben Finney <bignose+hates-spam@benfinney.id.au>
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)
Cancel-Lock sha1:VVAAIlkKCB160OzZzCqfrZfBKvQ=
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.11567.1404694875.18130.python-list@python.org> (permalink)
Lines 40
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1404694875 news.xs4all.nl 2842 [2001:888:2000:d::a6]:35191
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:74066

Show key headers only | View raw


Dan Stromberg <drsalists@gmail.com> writes:

> But I finally acknowledged that some very smart people don't
> understand tabs, or don't want to learn how to use them.

One day, you may reach the further realisation that those same very
smart people *do* understand tabs, and *do* know how to use them — and
nevertheless choose not to put them in source code, for good reasons.

> Also, I figured out how to get python files to use spaces and
> Makefile's to use tabs, using some slight vim configuration.

The makefile syntax is one of the excellent examples of why it's a
terrible idea to use tab characters in source code. It's also an
excellent example of how a poor design decision (a line beginning with
U+0020 SPACE is semantically different from a line beginning with U+0009
CHARACTER TABULATION) can be irrevocable – the syntax can't be changed
now, without breaking compatibility for countless makefiles out there
already – and cause endless confusion and wasted effort dealing with it.

Using a mature, well-customised, language-agnostic programmer's editor
does make it much better: Vim and Emacs can both seamlessly handle “tabs
are forbidden by default” as a configuration choice, along with “tabs
are necessary in make files, using spaces in the wrong place is an
error” at the same time.

> So I'm using 4 spaces now.
>
> It's nice not having to ignore the relevant pep8 and pylint warnings
> anymore.  And I don't miss tabs nearly as much as I thought I would.
> In fact, I'm not sure I miss them at all.

Hooray! Welcome to the light :-)

-- 
 \                   “The best ad-libs are rehearsed.” —Graham Kennedy |
  `\                                                                   |
_o__)                                                                  |
Ben Finney

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


Thread

Re: PEP8 and 4 spaces Ben Finney <ben@benfinney.id.au> - 2014-07-07 11:00 +1000
  Re: PEP8 and 4 spaces Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-07-07 02:28 +0000
    Re: PEP8 and 4 spaces Chris Angelico <rosuav@gmail.com> - 2014-07-07 12:50 +1000
  Re: PEP8 and 4 spaces Dan Sommers <dan@tombstonezero.net> - 2014-07-07 05:35 +0000
    Re: PEP8 and 4 spaces Ben Finney <ben@benfinney.id.au> - 2014-07-08 11:22 +1000
      Re: PEP8 and 4 spaces wxjmfauth@gmail.com - 2014-07-08 00:03 -0700
      Re: PEP8 and 4 spaces Steven D'Aprano <steve@pearwood.info> - 2014-07-08 08:48 +0000
        Re: PEP8 and 4 spaces Chris Angelico <rosuav@gmail.com> - 2014-07-08 19:05 +1000
        Re: PEP8 and 4 spaces Marko Rauhamaa <marko@pacujo.net> - 2014-07-08 12:09 +0300
          Re: PEP8 and 4 spaces Chris Angelico <rosuav@gmail.com> - 2014-07-08 20:28 +1000
            Re: PEP8 and 4 spaces Marko Rauhamaa <marko@pacujo.net> - 2014-07-08 14:13 +0300
              Re: PEP8 and 4 spaces Chris Angelico <rosuav@gmail.com> - 2014-07-08 21:37 +1000
        Re: PEP8 and 4 spaces Ben Finney <ben@benfinney.id.au> - 2014-07-09 12:41 +1000
          Re: PEP8 and 4 spaces wxjmfauth@gmail.com - 2014-07-09 01:19 -0700

csiph-web