Yield
Richard Brodie
R.Brodie at rl.ac.uk
Thu Nov 16 11:25:40 EST 2006
"Danny Colligan" <dannycolligan at gmail.com> wrote in message
news:1163693354.446751.38890 at b28g2000cwb.googlegroups.com...
> I absoultely agree. Thanks for pointing me out to some real-world
> code. However, the function you pointed me to is not a generator
> (there is no yield statement... it just returns the entire list of
> primes).
Oops, should have looked at the code more closely. Another example
would be os.walk() in the standard library.
More information about the Python-list
mailing list