generator testing and attrs

Terry Reedy tjreedy at udel.edu
Thu Oct 9 17:46:02 EDT 2003


"Mike" <vimakefile at yahoo.com> wrote in message
news:gGfhb.528065$Oz4.405020 at rwcrnsc54...
> I need to be able to store a list of schedulable items, either
regular
> callables or generator-producing functions -- is there a way to test
if a fn
> is generator-producing?

Yes, but I forget how.  The ref-man section on type hierarchy lists
and explains 'special attributes' for each type.  Functions or code
objects have an indication of normal vs. generator.

TJR






More information about the Python-list mailing list