[Python-ideas] Allowing breaks in generator expressions by overloading the while keyword

Antoine Pitrou solipsis at pitrou.net
Fri Feb 21 14:45:51 CET 2014


> 2014-02-21 15:34 GMT+02:00 Masklinn <masklinn at masklinn.net>:
> >
> > On 2014-02-21, at 14:03 , M.-A. Lemburg <mal at egenix.com> wrote:
> > > On 21.02.2014 13:25, Nick Coghlan wrote:
> > > I wonder why people are so keen on stuffing too much logic into
> > > a single line. Must be a twitter/SMS side-effect.
> >
> > "Line" is a red herring, I think. Nobody *really* cares about lines.
> 
> People do. There are only a handful of them in the screen. And the eyes
> catch even less in a single glance.

But on the contrary, trying to compress control flow in a single line
breaks the visual structure expectation for Python code (in which most
control flow is introduced by a colon and a linefeed).

Regards

Antoine.




More information about the Python-ideas mailing list