Why "flat is better than nested"?

kj no.email at please.post
Mon Oct 25 06:07:42 EDT 2010



In "The Zen of Python", one of the "maxims" is "flat is better than
nested"?  Why?  Can anyone give me a concrete example that illustrates
this point?

TIA!

~kj

PS: My question should not be construed as a defense for "nested".
I have no particular preference for either flat or nested; it all
depends on the situation; I would have asked the same question if
the maxim had been "nested is better than flat".



More information about the Python-list mailing list