I recently made a list of things to do to improve ones python coding abilities for a co-worker. One of the suggestions I gave him (besides writing actual python code) was to read other's code (hopefully it's good code). So my question to you python folk is what code would you put on the pedestal for being "pythonic"?
I know of one project that routinely examines Bazaar's codebase to see how they do things. One nice thing about the bazaar mailing list is that they often dissect patches, so it seems that the code quality is pretty good. What are some other stellar projects out there that have great code? (What the code actually does isn't as important as the quality of the code). Any modules in the standard library that stick out? Any particularly good recipes?
Just because python is readable, doesn't mean that all python code is any good. Some common pitfalls of various python programmers appear to be programming as if python were another language (C, Java, etc), not modularizing their code at all (100 line functions if functions at all), no documentation, no testing, or including patterns just to include them.
And for an example of what not to suggest, here's some code
<http://files.blog-city.com//files/F05/96843/b/piccopy.py>
__ I wrote
about 5 years ago. It's sort of the "hello world" of photo management
when you are running linux. (A few others have said they have very
similar programs). It copies files from one directory to another and
in the process creates a hierarchy of date directories to store the
image in. (I guess it illustrates, what I consider a wart of python,
in that I have to use os, os.path, shutil and stat to manipulate
files. As an aside, I'm looking forward to the replacement for the
failed PEP 355)