On 26Jun2017 23:26, Koos Zevenhoven <[email protected]> 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 <[email protected]>

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

Reply via email to