[Python-ideas] Possible PEP 380 tweak

Guido van Rossum guido at python.org
Sat Oct 30 01:54:36 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.

I don't think it is.

> 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.

Oh, but I still don't like that PEP, and it has a much higher
probability of failing completely. PEP 380 OTOH has my approval except
for minor quibbles like g.close().

--Guido van Rossum (python.org/~guido)

More information about the Python-ideas mailing list