[Python-ideas] Possible PEP 380 tweak

ghazel at gmail.com ghazel at gmail.com
Sat Oct 30 01:50:53 CEST 2010

On Fri, Oct 29, 2010 at 4:46 PM, Jacob Holm <jh at improva.dk> wrote:
> On 2010-10-30 01:37, Greg Ewing wrote:
>> Guido van Rossum wrote:
>>> But since this PEP also specifies "return value" it would be nice if
>>> there was a convenient way to capture this value, and close seems to
>>> be it.
>> Sorry, I missed that bit -- you're right, it does need to be
>> allowed for in PEP 380 if we're to do this. I'm still not
>> convinced that it isn't a wrongheaded idea, though. The fact
>> that it doesn't play well with yield-from gives off a very
>> bad smell to me.
>> It seems highly incongruous for the PEP to propose a feature
>> that's incompatible with the main idea of the whole thing.
> Which is exactly why I'm suggesting dropping "return value" from PEP 380
> and then doing it *right* in PEP 3152, which has a much better rationale
> for the "return value" feature anyway.

Why not split "return value" for generators in to its own PEP? There
is currently a use case for it in frameworks which use generators for
coroutines, without any dependency on PEP 380 or PEP 3152.


More information about the Python-ideas mailing list