On 26Jun2017 23:26, Koos Zevenhoven <k7ho...@gmail.com> wrote:
I sometimes wish there was something like

c from:
   yield from a
   yield from b

Nice.

​...or to get a list:

c as list from:
   yield from a
   yield from b

...or a sum:

c as sum from:
   yield from a
   yield from b

These would be great for avoiding crazy oneliner generator expressions.

Also nice, but for me a nonstarter because it breaks the existing pythyon idion that "... as foo" means to bind the name "foo" as the expression on the left. Such as with import, except.

So +1 for the form, -1 for the particular keyword.

Cheers,
Cameron Simpson <c...@zip.com.au>

Trust the computer industry to shorten Year 2000 to Y2K. It was this thinking that caused the problem in the first place.
- Mark Ovens <ma...@uk.radan.com>
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to