On Fri, May 28, 2021 at 4:49 AM Shreyan Avigyan <[email protected]> wrote: > > Reply to Chris: > > The only problem is that with that approach that we can't understand if > that's the last yield statement. To achieve that we need to keep going until > we encounter a StopIteration. And the value of x would 3. Because we're not > iterating over a particular generator. We're creating multiple instances > which actually would increase x. > > And also is there another way we can make it thread safe? Steven's idea is > actually the only solution we've encountered till now. I'd be really happy if > someone could come up with even a better idea. >
Also - Steven's idea is NOT a solution. It worsens the problem. I don't see how it is at all a solution. ChrisA _______________________________________________ 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/WWK7YMX36TSJFUURARNIVKMO3GO3X3XI/ Code of Conduct: http://python.org/psf/codeofconduct/
