Hi all.

Is there a way to know if a function object is actually a "generator 
function" or not ? e.g.:

def f():
        pass

def g():
        yield None

f.__class__ is the same as g.__class__ , i.e. "function" type.
But i "know" that the second, when invoked, returns a generator object, 
because there is a "yield" statement in its body.

Is there a (eventually hackish) method to get such information ?

Thanks in advance,

Diego.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to