[Python-ideas] Cofunctions - an enhancement to yield-from
solipsis at pitrou.net
Mon Aug 2 18:37:41 CEST 2010
On Mon, 02 Aug 2010 12:21:57 -0400
Scott Dial <scott+python-ideas at scottdial.com>
> I disagree with this opinion. I have run into this pattern before and
> while I didn't need the whole generator protocol honored, I would've
> benefited just from the fact that the proposed "yield from" flattened
> the iteration.
How would you have benefitted? Is it a problem if the iteration isn't
If it's because of the recursion limit, then it's a general problem
and I don't think a generator-specific solution is a good idea.
If it's an aesthetical preference then I don't think new syntax is
warranted for that.
More information about the Python-ideas