I'm searching for Python style guidelines

Colin J. Williams cjw at sympatico.ca
Tue Jan 8 19:01:02 CET 2008


Martin Vilcans wrote:
> On 1/7/08, Guilherme Polo <ggpolo at gmail.com> wrote:
>> 2008/1/7, MartinRinehart at gmail.com <MartinRinehart at gmail.com>:
>>> Anything written somewhere that's thorough? Any code body that should
>>> serve as a reference?
>> PEP 8
>> http://www.python.org/dev/peps/pep-0008/
> 
> The problem with PEP 8 is that even code in the standard libraries
> doesn't follow the recommendations regarding the naming of functions
> for example. The recommendation is to_separate_words_with_underscore,
> but some code uses lowerCamelCase instead.
> 
> I tended to dislike the underscore convention, but after forcing
> myself to use it for a while I'm starting to appreciate its beauty.

I've come to like lowerCamelCase and a 
tab of 2.

A tab of 4 wastes more space than is 
needed for the occasional heavy
indenting.

Colin W.




More information about the Python-list mailing list