(f, flag)
return bool(f.__code__.co_flags & flag)
Return true if ``f`` is a function (or a method or functools.partial
    wrapper wrapping a function) whose code object has the given ``flag``
    set in its flags.
Return true if ``f`` is a function (or a method or functools.partial
    wrapper wrapping a function) whose code object has the given ``flag``
    set in its flags.
Return true if f is a function ( or a method or functools . partial wrapper wrapping a function ) whose code object has the given flag set in its flags .
def _has_code_flag(f, flag):
    """Return true if ``f`` is a function (or a method or functools.partial
    wrapper wrapping a function) whose code object has the given ``flag``
    set in its flags."""
    while ismethod(f):
        f = f.__func__
    f = functools._unwrap_partial(f)
    if not isfunction(f):
        return False
    return bool(f.__code__.co_flags & flag)
def _has_code_flag ( f , flag ) : while ismethod ( f ) : f = f . __func__ f = functools . _unwrap_partial ( f ) if not isfunction ( f ) : return False return bool ( f . __code__ . co_flags & flag )