PyDocs

Nav

Python Runtime Services

isfunction

inspect

function (source)
  • isfunction(object)
Return true if the object is a user-defined function.

Function objects provide these attributes:
    __doc__         documentation string
    __name__        name with which this function was defined
    __qualname__    qualified name of this function
    __module__      name of the module the function was defined in or None
    __code__        code object containing compiled function bytecode
    __defaults__    tuple of any default values for arguments
    __globals__     global namespace in which this function was defined
    __annotations__ dict of parameter annotations
    __kwdefaults__  dict of keyword only parameters with defaults
    __dict__        namespace which is supporting arbitrary function attributes
    __closure__     a tuple of cells or None
    __type_params__ tuple of type parameters
0 Examples
No examples for inspect/isfunction.
See Also
No see-alsos for inspect/isfunction
0 Notes
No notes for isfunction