
March 28, 2009
12:58 a.m.
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. -- Greg