C
chansky
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.
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.