In annotations <6>:"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."
This two annotations and while True loop will misguide noob readers(like me) to a certain degree.
It would be better to replace while True with yield.
Please info me if I get something wrong.
Thanks for your coding.
In annotations <6>:"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." This two annotations and
while True
loop will misguide noob readers(like me) to a certain degree. It would be better to replacewhile True
withyield
. Please info me if I get something wrong. Thanks for your coding.