Python style guidelines

Richie Hindle richie at entrian.com
Fri Mar 12 10:36:32 CET 2004


[Will]
> I think nothing is more evil about coding standards than indentation. 

The first time I hacked the sources to Python itself I was astonished to
find that the coding standard for the C code specifies 8-space indents and
a line limit of 80 characters.  How could anyone write code in such a
restricted format?  Then I looked at the code and realised what a
wonderful effect those rules have.  The code is simple, clearly written,
well organised and easy to read and understand.  And I believe the code I
contributed is higher quality as a result of those restrictions.  Had I
followed my own (loose) standard of 4-character indents and 100-character
lines, the code would have been harder to read - it would have had deeper
nesting and more complicated expressions.

-- 
Richie Hindle
richie at entrian.com





More information about the Python-list mailing list