Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #107424 > unrolled thread

Re: PEP proposal: sequence expansion support for yield statement: yield *

Started byAlan Evangelista <alanoe@linux.vnet.ibm.com>
First post2016-04-20 16:54 -0300
Last post2016-04-20 16:54 -0300
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: PEP proposal: sequence expansion support for yield statement: yield * Alan Evangelista <alanoe@linux.vnet.ibm.com> - 2016-04-20 16:54 -0300

#107424 — Re: PEP proposal: sequence expansion support for yield statement: yield *

FromAlan Evangelista <alanoe@linux.vnet.ibm.com>
Date2016-04-20 16:54 -0300
SubjectRe: PEP proposal: sequence expansion support for yield statement: yield *
Message-ID<mailman.39.1461182700.12923.python-list@python.org>
> 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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web