LWN.net Logo

Generator-based state machines (IBM developerWorks)

David Mertz writes about Python simple generators on IBM's developerWorks. "It takes a while to completely "get" Python 2.2's new generators. Even after writing an introduction to simple generators in an earlier "Charming Python" installment, I could not say that I fully understood the "gestalt" of generators. This article presents some additional patterns for the use of generators, and hopefully brings both myself and readers further into the mindset of "resumable functions.""
(Log in to post comments)

Copyright © 2002, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds