the core values of the Python "platform"

Ben Finney ben+python at benfinney.id.au
Wed Sep 13 22:04:04 EDT 2017


ram at zedat.fu-berlin.de (Stefan Ram) writes:

> Thomas Jollans <tjol at tjol.eu> writes:
> >>>> import this
>
>   It says »Flat is better than nested.«, which would
>   mean that
>
> x.f().g().h()
>
>   is better than
>
> h( g( f( x )))

That's quite a stretch. Why would “flat is better than nested” mean that
specifically, rather than other possible interpretations?

I could try to argue, for example, that “flat is better than nested”
means that “no indentation is better than indentation”. But why should
anyone take that interpretation seriously?

As I understand it, “flat is better than nested” is talking about
*hierarchies* in a code base. It's not IIUC referring to anything about
the difference between expressions like you wrote.

-- 
 \      “If society were bound to invent technologies which could only |
  `\   be used entirely within the law, then we would still be sitting |
_o__)       in caves sucking our feet.” —Gene Kan, creator of Gnutella |
Ben Finney




More information about the Python-list mailing list