[Python-ideas] Yield-From: Finalization guarantees
Nick Coghlan
ncoghlan at gmail.com
Sat Mar 28 09:16:07 CET 2009
Greg Ewing wrote:
> Nick Coghlan wrote:
>> The part that
>> isn't clicking for me is that I still don't understand *why* 'yield
>> from' should include implicit finalisation as part of its definition.
>>
>> It's the generalisation of that to all other iterators that happen to
>> offer a close() method that seems somewhat arbitrary.
>
> It's a matter of opinion. I would find it surprising if
> generators behaved differently from all other iterators
> in this respect. It would be un-ducktypish.
>
> I think we need a BDFL opinion to settle this one.
It's still your PEP, so unless Guido objects to your preference, I'll
cope - I suspect either approach can be explained easily enough in the
documentation.
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
---------------------------------------------------------------
More information about the Python-ideas
mailing list