generator function

Michael Peuser mpeuser at
Thu Aug 7 19:15:07 CEST 2003

By chance I posted two examples of infinite generators some hours ago
news:bgt31l$jnp$03$1 at

I fond Devid Mertz's artikel quite instructive:,l=252,p=it


"chansky" <tom_chansky at> schrieb im Newsbeitrag
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 function
> other than the fact that a generator can retain the state of the local
> 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.

More information about the Python-list mailing list