[Python-Dev] Re: Zen of Python

Stephen Thorne stephen.thorne at gmail.com
Thu Jan 20 01:14:55 CET 2005


On Wed, 19 Jan 2005 19:03:25 -0500, Timothy Fitz <firemoth at gmail.com> wrote:
> On Thu, 20 Jan 2005 09:03:30 +1000, Stephen Thorne
> <stephen.thorne at gmail.com> wrote:
> > "Flat is better than nested" has one foot in concise powerful
> > programming, the other foot in optimisation.
> >
> > foo.bar.baz.arr involves 4 hashtable lookups. arr is just one hashtable lookup.
> 
> I find it amazingly hard to believe that this is implying optimization
> over functionality or clarity. There has to be another reason, yet I
> can't think of any.

What I meant to say was, 'flat is better than nested' allows you to
write more concise code, while also writing faster code.

Stephen.


More information about the Python-Dev mailing list