Beautiful Python

by jesse in ,


Another question for the 'web - what's the "best" python code you've seen - and I don't mean things like gratuitous use of list comps and lambas. I'm asking for more what module/tool/code have you seen that displays all of python's best attributes - readability, simplicity, power coupled with excellent programming practices, i.e: docs, tests, PEP8 compliance, etc? Obviously, what constitutes "beautiful code" varies for people - some people get their happiness from writing obfuscated code, others find anything involving more than one line of code an affront to their deity.

Given that code is more often read than written: What code do you like reading the most?

as a side note: I was making an analogy that houses are like code bases - filled with creative engineering, latent defects, etc to Brett, and rhetorically asked "but how many code bases have toilets". Brett had an answer: According to Google code, about 7000.