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 __code__ code object containing compiled function bytecode
(object)
| 376 | return False |
| 377 | |
| 378 | def isfunction(object): |
| 379 | """Return true if the object is a user-defined function. |
| 380 | |
| 381 | Function objects provide these attributes: |
| 382 | __doc__ documentation string |
| 383 | __name__ name with which this function was defined |
| 384 | __code__ code object containing compiled function bytecode |
| 385 | __defaults__ tuple of any default values for arguments |
| 386 | __globals__ global namespace in which this function was defined |
| 387 | __annotations__ dict of parameter annotations |
| 388 | __kwdefaults__ dict of keyword only parameters with defaults""" |
| 389 | return isinstance(object, types.FunctionType) |
| 390 | |
| 391 | def _has_code_flag(f, flag): |
| 392 | """Return true if ``f`` is a function (or a method or functools.partial |
no outgoing calls
no test coverage detected