I would definitely recommend sync'ing the python subversion tree and picking a few modules and reading through them. Doing so taught me some of the less obvious things within the language, and also taught me a lot about the various dunder (__foo__) methods for objects.<p>Additionally, I'd recommend reading through the PEP documents (<a href="http://python.org/dev/peps/" rel="nofollow">http://python.org/dev/peps/</a>) - there's a lot of great examples and rationales contained in those.<p>Finally, Doug hellmann has done an excellent job with his Python Module of the Week series (<a href="http://www.doughellmann.com/PyMOTW/" rel="nofollow">http://www.doughellmann.com/PyMOTW/</a>) and a new project "The hazel tree" (<a href="http://www.thehazeltree.org/" rel="nofollow">http://www.thehazeltree.org/</a>) is doing a great job at compiling the various examples, docs/etc together in one place.
It's an essay that contains code, but this is one of my all time favorites:<p>Peter Norvig writes a spelling corrector in 21 lines of Python:
<a href="http://norvig.com/spell-correct.html" rel="nofollow">http://norvig.com/spell-correct.html</a>
I learned quite a bit from web.py (<a href="http://github.com/webpy/webpy/tree/master" rel="nofollow">http://github.com/webpy/webpy/tree/master</a>). It's small enough to be fun to poke through, but has more than enough "advanced" Python tricks to be worth your while.
Python ships with plenty of good python code. Just take your time and read through the Lib directory of your standard python distribution.<p><a href="http://svn.python.org/view/python/trunk/Lib" rel="nofollow">http://svn.python.org/view/python/trunk/Lib</a>
Mailman <a href="http://list.org/" rel="nofollow">http://list.org/</a><p>Things you should be looking at are queues and error handling in an asynchronous message passing architecture.<p>Also you'll learn that not every web application needs an SQL database for persistence.
For performance and algorithms the implementations at
<a href="http://shootout.alioth.debian.org/u32q/python.php" rel="nofollow">http://shootout.alioth.debian.org/u32q/python.php</a>
and pay attention to the different benchmarks.<p>Also all RPython code coming from pypy, sometimes shown in
<a href="http://morepypy.blogspot.com/" rel="nofollow">http://morepypy.blogspot.com/</a><p>They are reimplementing all the C modules and doing a great job. The new implementations are of course closer to current best practices in python.<p>Enjoy.
pybloxsom is a nice project to hack on; you can read and understand the whole of the code in a day, and it illustrates the "request handler with filters" design pattern very nicely. <a href="http://pyblosxom.sourceforge.net/" rel="nofollow">http://pyblosxom.sourceforge.net/</a>
I enjoyed reading the code from "Hacking RSS and Atom" by
Leslie M. Orchard (ISBN: 978-0-7645-9758-9). There's a lot more to it than just RSS related code and if you read the book you get the explanation too.