[SciPy-User] OT warning! Re: ANN: Spyder v2.0.8

Matthew Brett matthew.brett@gmail....
Thu Mar 3 16:52:09 CST 2011


Hi,

On Thu, Mar 3, 2011 at 2:39 PM, Christopher Barker
<Chris.Barker@noaa.gov> wrote:
> On 3/3/11 12:51 PM, Alan G Isaac wrote:
>> On 3/3/2011 2:31 PM, Christopher Barker wrote:
>>> four spaces is a well established standard
>>
>> ... for the standard library.  Individual projects
>> set their own standards.
>
> OK -- PEP 8 is only _official_ for the standard library, but if you
> define "standard" as "the way most people do it", then four spaces is it.
>
>>  (Unfortunately, PEP 8 came
>> down on the wrong side of tabs vs. spaces.)
>
> clearly debatable, but my point is that it is a good idea for all
> projects to use the same conventions, and the ONLY one that makes any
> sense at this point in that context is four spaces.
>
> Pythons "there should be only one obvious way to do it" philosophy
> applies here.

I enjoyed this blog post:

http://www.artima.com/weblogs/viewpost.jsp?thread=74230

reprinted in:

http://www.amazon.com/Best-Software-Writing-Selected-Introduced/dp/1590595009

Quote:

Premise 1: For any given language, there are one or a few common coding styles.
Premise 2: There is not now, nor will there ever be, a programming
style whose benefit is significantly greater than any of the common
styles.
Premise 3: Approximately a gaboozillion cycles are spent on dealing
with coding style variations.
Premise 4: For any non-trivial project, a common coding style is a good thing.
Conclusion: Thinking of all the code in the entire world as a single
"project" with a single style, we would get more value than we do by
allowing for variations in style.

Best,

Matthew


More information about the SciPy-User mailing list