generator function

chansky tom_chansky at rocketmail.com
Thu Aug 7 09:03:00 EDT 2003


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