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 -- [email protected] > To unsubscribe send an email to [email protected] > https://mail.python.org/mailman3/lists/python-ideas.python.org/ > Message archived at > https://mail.python.org/archives/list/[email protected]/message/F3P77JCXI4JYGXVXT6BWTK4BDB2BFM2F/ > Code of Conduct: http://python.org/psf/codeofconduct/ >
_______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/OPFC4QI6HNPEWC4LOPDBO4LBLY3VECNN/ Code of Conduct: http://python.org/psf/codeofconduct/
