[Tutor] Getting exposure to high quality Python code

Alan Gauld alan.gauld at btinternet.com
Wed May 27 20:23:13 CEST 2009

"Daniel Brown" <endlessly.curious at gmail.com> wrote 

> Can anyone recommend any ways of getting exposed to high quality
> Python code?  Normally I would expect this to happen during code
> reviews but Python usage is not wide spread where I work.  So I need
> some alternative sources to help me develop my Python style...

The source code for many of the standard library modules is available 
to you in the installation itself. There are also some sample apps such 
as the regex tester.

Also if you install Django you have another bunch of files to look at.
And search source forge for python projects, lots of examples.

Finally look at the ActiveState web site for Python recipes. 
Lots of good ideas there. 

Of course what constitutes good code is somewhat subjective but 
the library and recipes are virtually all pretty good code IMHO.

Alan Gauld
Author of the Learn to Program web site

More information about the Tutor mailing list