Glossary: Software Design Patterns
Generator
Also written: generators, yield
A function that uses `yield` to hand back one item, then pauses until the loop asks for the next. It is the easy way to write your own iterator.
Glossary: Software Design Patterns
Also written: generators, yield
A function that uses `yield` to hand back one item, then pauses until the loop asks for the next. It is the easy way to write your own iterator.