I'm searching for Python style guidelines

Caleb a at b.c
Thu Jan 10 09:20:23 EST 2008


MartinRinehart at gmail.com wrote:

> Anything written somewhere that's thorough? Any code body that should
> serve as a reference?

1. Don't use tabs (use spaces).
2. Study "import this"
3. Use lists and dictionaries as much as you possibly can
4. Use comprehensions and generators as much as you possibly can
5. Use the standard library for everything you possibly can
6. As much as you possibly can, when starting a new project, postpone 
setting up classes for everything (start with functions).  In some 
projects, you might never need the overhead at all.

It will be difficult to go far wrong regarding style if you do a lot of 
what's in this list.  This list is not mine.  I jotted these points 
down, but this information is continually repeated by the actual wise 
people (not me) in this newsgroup.

Caleb



More information about the Python-list mailing list