PEP proposal: sequence expansion support for yield statement: yield *
Alan Evangelista
alanoe at linux.vnet.ibm.com
Wed Apr 20 15:54:48 EDT 2016
> Currently the common pattern for yielding the elements in a sequence is as follows:
>
> for x in sequence: yield x
>
> I propose the following replacement (the result would be identical):
>
> yield *sequence
imho the current syntax is much more intuitive, it is obvious to infer what it does
by looking at it. I favor a more intuitive syntax over a more concise one.
Regards,
Alan Evangelista
More information about the Python-list
mailing list