I've also been a Python user for 24 years now. Since long before iterators were a feature of Python. I wrote quite a few widely read articles about iterators when they were introduced, including the first about leverageing iterators for coroutines.
I can't say I've NEVER encountered a glitch with exhausted iterators. But it's been rare, and it never motivated me to want the behavior changed. On Tue, Jun 13, 2023, 5:52 PM BoppreH via Python-ideas < python-ideas@python.org> wrote: > Sorry, I'm new to the list and was not aware the burden of proof was so > high. Can you point me to one or two successful posts in Python-ideas where > I can learn how to show there's a real need for a feature? > > On Tue, Jun 13, 2023, at 11:25 PM, Chris Angelico wrote: > > On Wed, 14 Jun 2023 at 07:02, BoppreH via Python-ideas > <python-ideas@python.org> wrote: > > > > > In close to 10 years of experience with python I have never > encountered anything like this. > > > > Here's a small selection of the StackOverflow questions from people who > encountered this exact issue: > > But now try to find people who would be adversely affected by your > proposed change. Unless you do it in a purely backward compatible way > such as the local shadowing of iter(), you WILL break other people's > code. What you've shown is that a small handful of people have > wondered at the reiterability of generators, which is NOT the same as > wanting a warning in these situations. > > Even if we consider that every single upvote represents a person who > wants this feature, you've shown, what, a thousand people total? > Across the whole world? That's not exactly an overwhelming number of > people, and hardly enough to make a backward-incompatible language > change. > > Let's go back to your earlier incredulity: > > > And I have to say I'm surprised by the responses. Does nobody else hit > bugs like this and wish they were automatically detected? > > You've found a dozen questions that have been upvoted by a maximum of > 124 people, by your own count (I didn't bother going through all the > questions to check). Let's make some VERY generous estimates: > > 1) Every upvote represents a unique person (pretending that nobody > browses multiple questions and upvotes them all) > 2) Each of those people agrees with your proposal > 3) The total upvote count is 1000 (feel free to go and sum them for > me, I can't be bothered) > 4) For everyone who upvotes, nine others don't bother to upvote > > That'll give an incredibly generous figure of 10,000 Stack Overflow > users who might support your proposal. > > Stack Overflow has 21 million users [1]. If we assume that those who > answer their survey are representative (impossible to prove, but the > best we can do), about half of those are Python users [2]. That's > roughly 10,000,000 Stack Overflow users who use Python. > > Even if we assume that Stack Overflow users are representative of the > internet at large (they're definitely not, but again, it's good to at > least having some figures), that's 0.1% of people. > > So..... yeah, I'm not surprised that none of us here has run into a > problem. I strongly recommend reconsidering the "shadow iter() in your > own code" solution, as it is entirely backward compatible. > > ChrisA > > [1] https://stackexchange.com/sites and select Stack Overflow - it says > "21m" > [2] https://stackoverflow.blog/2023/06/13/developer-survey-results-are-in/ > _______________________________________________ > Python-ideas mailing list -- python-ideas@python.org > To unsubscribe send an email to python-ideas-le...@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/YOGCY5HPSKXTONCHYZ3GBS7RKSIOY5YR/ > Code of Conduct: http://python.org/psf/codeofconduct/ > > > _______________________________________________ > Python-ideas mailing list -- python-ideas@python.org > To unsubscribe send an email to python-ideas-le...@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/E7ULORC3VJ7ZQKIMV77GWYWITPD3WWD3/ > Code of Conduct: http://python.org/psf/codeofconduct/ >
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@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/VSPKEWM2HXB5YJH5VWIM62E3SK3BSNII/ Code of Conduct: http://python.org/psf/codeofconduct/