(obj)
return _has_code_flag(obj, CO_GENERATOR)
Return true if the object is a user-defined generator function.

    Generator function objects provide the same attributes as functions.
    See help(isfunction) for a list of attributes.
Return true if the object is a user-defined generator function.
Return true if the object is a user - defined generator function .
def isgeneratorfunction(obj):
    """Return true if the object is a user-defined generator function.

    Generator function objects provide the same attributes as functions.
    See help(isfunction) for a list of attributes."""
    return _has_code_flag(obj, CO_GENERATOR)
def isgeneratorfunction ( obj ) : return _has_code_flag ( obj , CO_GENERATOR )