On 18 October 2016 at 07:31, Nick Coghlan <ncogh...@gmail.com> wrote:
> Forcing ourselves to come up with a name for the series of values
> produced by the outer iteration then makes that name available as
> documentation of our intent for future readers of the code.

This is a key point, that is frequently missed when people propose new
"shorter" syntax, or constructs that "reduce indentation levels".

Make no mistake, coming up with good names is *hard* (and I have
enormous respect for the (often unrecognised) people who come up with
intuitive APIs and names for functions). So it's very easy to be
tempted by "concise" constructs that offer the option of not naming an
operation. But as someone who spends 99% of his time doing maintenance
programming, be sure that the people who support your code will thank
you for spending time naming your abstractions (and avoiding using
constructs like the one proposed here).

Python-ideas mailing list
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to