generator function

Terry Reedy tjreedy at
Thu Aug 7 19:06:16 CEST 2003

"chansky" <tom_chansky at> wrote in message
news:215fa0fc.0308070503.2344dd66 at
> I read the following link about generator:
> but I am still not so clear on the use/purpose of a generator
> other than the fact that a generator can retain the state of the
> variables within the fuction body.  Can someone out there shed some
> lights on this topic or share about how/when you would ever use a
> generator function.

Besides the other answers, Lib/test/, at 40K,
contains a tutorial and lots of examples, include some that many would
not readily think of.


More information about the Python-list mailing list