I'm searching for Python style guidelines

Neil Cerutti mr.cerutti at gmail.com
Tue Jan 8 13:10:01 EST 2008


On Jan 8, 2008 12:35 PM, Martin Vilcans <martin at librador.com> 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.

Conventions get broken when there's a good reason, e.g., elegant
looking "deque" instead of clumsy looking "Deque".

-- 
Neil Cerutti <mr.cerutti+python at gmail.com>



More information about the Python-list mailing list