The pythonic approach

Alex Martelli aleaxit at yahoo.com
Wed Sep 15 13:32:48 EDT 2004


Peter Hansen <peter at engcorp.com> wrote:
   ...
> code pattern.  (Even so, I would tend to include a doc-string
> or comment describing the basic algorithm, to let another
> programmer more easily comprehend the approach taken.)

That's never wrong, of course.

> Principle of least surprise.  One rarely encounters .get(x, x)

Funny -- I encounter it SO often I consider it a basic idiom!!!


Alex



More information about the Python-list mailing list