Skip to content

19-coroutine/coroaverager3:grouper #15

Closed

Description

@dongzeXD

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

Activity

  1. ramalho commented on Aug 26, 2021

    @ramalho
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions