[Tutor] generators

mike jackson mgjack at gmx.com
Tue Apr 3 20:38:59 CEST 2012


I am trying understand python and have done fairly well, So for it has been easy to learn and is concise.  However I seem to not quite understand the use of a generator over a function(I am familiar with functions [other languages and math]).  To me (excepting obvious syntax differences) a generator is a function.  Why should I use a generator instead of a function or vice versa?  Is perhaps specfic uses it was created to handle?  A great web page with good examples would be nice.  Of course if you can sum it up rather easy then by all means go ahead.  


More information about the Tutor mailing list