You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In <6> annotations :"Each iteration in thisloop creates a new instance of averager; each is a generator object operating as a coroutine." and <7>:"Whenever grouper is sent a value, it’s piped ..., the value it returns is bound to results[key]. The while loop then proceeds to create another averager instance to consume more values."
Would I replace while True with yield?
This seems easier to understand
I have moved most content about classic coroutines from the second edition to the companion web site. The former chapter 19 is now at Classic Coroutines, including the example with the issue you have reported.
Activity
ramalho commentedon Aug 26, 2021
Thanks for reporting this.
I have moved most content about classic coroutines from the second edition to the companion web site. The former chapter 19 is now at Classic Coroutines, including the example with the issue you have reported.
Accordingly, I have recreated the issue in the site repository: fluentpython/book-site#4.
My priority now is to finish the book, so I will not be able to analyze the issue you reported until I deliver the revised draft. Thanks.