I'm searching for Python style guidelines
a at b.c
Thu Jan 10 15:20:23 CET 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.
More information about the Python-list