translate http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html