
Any thoughts on logging a warning, perhaps behind an opt-in flag? I could not find a single false positive scenario, so I expect the signal-to-noise ratio to be high and prevent lots of bugs. BoppreH On Tue, Jun 13, 2023, at 1:05 AM, Greg Ewing wrote:
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 _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-leave@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/F3P77J... Code of Conduct: http://python.org/psf/codeofconduct/