[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Standardizing our Python code style

From: Greg Stein <gstein_at_gmail.com>
Date: Thu, 22 Oct 2009 17:48:10 -0400

On Thu, Oct 22, 2009 at 16:38, Greg Hudson <ghudson_at_mit.edu> wrote:
> On Thu, 2009-10-22 at 15:51 -0400, Greg Stein wrote:
>> I'm going to stick to 2-space. That's what Guido himself uses, so if
>> it is good enough for him, then it's good enough for me :-D
> He does?  It seemed odd to me that a language would have an official
> style guide so fundamentally at odds with the language's creator, so I
> googled around, and found only evidence that Guido favors four-space
> indentation.  Specifically:
> * The Python code style guide (PEP-8) was originally written by Guido,
> although it now has two authors and the original is not available:
> http://www.python.org/dev/peps/pep-0008/
> * The C style guide for the Python implementation was written by Guido,
> and pushes four-space indents: http://www.python.org/dev/peps/pep-0007/
> * A discussion of enforcing indentation style in the Python interpreter
> (rejected) referenced Guido as pushing four-space indentation:
> http://www.velocityreviews.com/forums/t690805-why-not-enforce-four-space-indentations-in-version-3x.html
> * http://www.peterbe.com/plog/Google-and-python-code complains that:
>        All Python code from Google Code uses 2 spaces (not tabs) and
>        that's not what Guido uses or recommends.

Hunh! I swear when I was talking to him, he said "2 spaces". I betcha
that I'm misremembering, and he was just saying he'd follow the
2-space style that Google uses. (and that I can definitely confirm; I
was a style reviewer while there)

Thanks for fixing my doddering old memory! :-P


Received on 2009-10-22 23:48:15 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.