Generator Frustration
Joel
joel.welling at gmail.com
Mon Jun 20 23:03:39 EDT 2011
More information about the Python-list mailing list
Mon Jun 20 23:03:39 EDT 2011
- Previous message (by thread): Generator Frustration
- Next message (by thread): We wholesale Amazon Kindle/ Monster Beats / Ipods / Apple products of all types
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Jun 20, 9:42 pm, Terry Reedy <tjre... at udel.edu> wrote: > > A nomenclature note: a function with yield is a 'generator function'. It > is an instance of the 'function' class, same as for any other def > statement (or lambda expression). It returns an instance of class > 'generator, as you note here > > > and will test as such with 'if type(result)==types.GeneratorType:'. > > It is the result, and not the function, that is the generator (a type of > iterator). > > -- > Terry Jan Reedy Yes, quite right. I stand corrected. -Joel
- Previous message (by thread): Generator Frustration
- Next message (by thread): We wholesale Amazon Kindle/ Monster Beats / Ipods / Apple products of all types
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list