[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 Hudson <ghudson_at_mit.edu>
Date: Thu, 22 Oct 2009 16:38:12 -0400

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.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2410420
Received on 2009-10-22 22:38:27 CEST

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