How to recognise "generator functions" ?
John J. Lee
jjlee at reportlab.com
Fri Jul 21 19:54:37 EDT 2006
imho <certo at comeno.it> writes:
> Georg Brandl ha scritto:
>
> >>>> f.func_code.co_flags
> > 67
> >>>> g.func_code.co_flags
> > 99
> > => 32 (CO_GENERATOR in compiler.consts) is the flag that indicates a
> > generator code object.
> > Georg
>
> What a fast reply!
> Thank You very much! :-)
Georg, that was cruel <0.2 wink>
Seriously, does anybody have any sensible reason to *use* this
information? Maybe some dynamic code-analysis tool or something?
John
More information about the Python-list
mailing list