generator function

Michael Peuser mpeuser at web.de
Thu Aug 7 13:15:07 EDT 2003


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

I fond Devid Mertz's artikel quite instructive:
http://www-106.ibm.com/developerworks/linux/library/l-pycon?t=grl,l=252,p=it
erators%3E.

Kindly
Michael

"chansky" <tom_chansky at rocketmail.com> schrieb im Newsbeitrag
news:215fa0fc.0308070503.2344dd66 at posting.google.com...
> I read the following link about generator:
> http://www.python.org/peps/pep-0255.html
> 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