Clean-Code-in-Python/Chapter07 at master · TranQuangDuc/Clean-Code-in-Python · GitHub
Skip to content

Latest commit

 

History

History
 
 

Folders and files

README.rst

Clean Code in Python - Chapter 7: Using Generators

Run the tests:

make test

Working With Generators

  1. A First Glimpse at Generators: generators_1.py
  2. The States of a Generator: generators_2.py

Idiomatic Iteration

  1. Idioms for Iteration in Python: generators_pythonic_1.py

  2. The Iterator Design Pattern, the Python way

    2.1. A first approach of iteration with the iteration pattern: generators_pythonic_2.py

    2.2. The idiomatic way: using an Iterator: generators_pythonic_3.py

Coroutines

  1. The Methods of the Generator Interface: generators_coroutines_1.py
  2. Working with Coroutines: generators_coroutines_2.py
  3. Delegating Coroutines: generators_yieldfrom_{2..3}.py