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
(object)
| 265 | return False |
| 266 | |
| 267 | def isfunction(object): |
| 268 | """Return true if the object is a user-defined function. |
| 269 | |
| 270 | Function objects provide these attributes: |
| 271 | __doc__ documentation string |
| 272 | __name__ name with which this function was defined |
| 273 | __qualname__ qualified name of this function |
| 274 | __module__ name of the module the function was defined in or None |
| 275 | __code__ code object containing compiled function bytecode |
| 276 | __defaults__ tuple of any default values for arguments |
| 277 | __globals__ global namespace in which this function was defined |
| 278 | __annotations__ dict of parameter annotations |
| 279 | __kwdefaults__ dict of keyword only parameters with defaults |
| 280 | __dict__ namespace which is supporting arbitrary function attributes |
| 281 | __closure__ a tuple of cells or None |
| 282 | __type_params__ tuple of type parameters""" |
| 283 | return isinstance(object, types.FunctionType) |
| 284 | |
| 285 | def _has_code_flag(f, flag): |
| 286 | """Return true if ``f`` is a function (or a method or functools.partial |
no outgoing calls
no test coverage detected
searching dependent graphs…