Why "flat is better than nested"?

alex23 wuwei23 at gmail.com
Thu Oct 28 01:45:21 EDT 2010


Steven D'Aprano <steve-REMOVE-T... at cybersource.com.au> wrote:
> > Load the source code for the ‘this’ module into a text editor, and see
> > how many of the maxims it violates.
>
> None of them.

I'd say it easily violates the first 3, being neither beautiful,
explicit nor simple, and especially "Readability counts".

The whole thing could be replaced by a single print """The Zen
of...""". Arguing that re-implementing rot13 somehow doesn't go
against the grain of the Zen itself just seems odd.



More information about the Python-list mailing list