In the question
views:
316answers:
8You can't read too much source. I think a good idea would be to take some Pythonistas (Raymond Hettinger and Ian Bicking come to mind) and fish out their code from their projects or from other sources like ActiveState and go through them.
I think that the Python interface for Redis written by Andy McCurdy is a superb example of how Python code should be written, packaged, and organized. Have a look at the source code for yourself!
Check out Flask's code, the comments on the release announcement noted that the code was very well written:
http://lucumr.pocoo.org/2010/4/16/flask-0-1-released
Armin, the author of Flask, also wrote Werkzeug, which I use a lot, and find very well written. Here is the source:
The Twisted code is pretty well-written, although it is a somewhat complex codebase.
I know http://code.google.com/p/jaikuengine/ was ported to Google App engine by googlers, so there must be some good practices in there.
I vote for Django, maybe too much specific on web developing field.
Consider the stdlib, some modules more so than others. One project that I have found exemplifies good python coding practices is rietveld. Of course, good in one person's eyes is awful in another's.