
June 12, 2023
6:05 p.m.
On 13/06/23 9:59 am, Rob Cliffe via Python-ideas wrote:
Also the OP's request was for generators, not for any iterator.
IMO it would be a bad idea to make generators behave differently from other iterators in this regard. And it's far too late to redefine the iterator protocol in general, because that would require changing all existing iterators and all existing code that relies on the current behaviour. -- Greg