Python is readable
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Tue Mar 20 13:48:11 EDT 2012
On Tue, 20 Mar 2012 12:55:07 -0400, Nathan Rice wrote:
> This is one of my gripes with the dogmatic application of the "break it
> into multiple statements" mantra of Python.
I must admit I don't recognise that one, unless you're talking about "not
everything needs to be a one liner".
> Not only are you forced to
> use generators to maintain semantic equivalence in many cases, in some
> cases a partial statement fragment doesn't have any intuitive meaning.
> The result is that readers are forced to hold the value of
> intermediate_variable in their head while reading another statement,
> then translate the statement to the conceptually complete form. A
> statement should be an encoding from a conceptual space to a operation
> space, and ideally the two should be as similar as possible.
> If a concept is atomic, it should not be comprised of multiple
> statements.
Perhaps you could give some examples (actual or contrived) of stuff where
"breaking it into multiple statements" is a bad thing?
--
Steven
More information about the Python-list
mailing list