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 func_code code object containing compiled function bytecode func_
(object)
| 24 | return isinstance(object, types.MethodType) |
| 25 | |
| 26 | def isfunction(object): |
| 27 | """Return true if the object is a user-defined function. |
| 28 | |
| 29 | Function objects provide these attributes: |
| 30 | __doc__ documentation string |
| 31 | __name__ name with which this function was defined |
| 32 | func_code code object containing compiled function bytecode |
| 33 | func_defaults tuple of any default values for arguments |
| 34 | func_doc (same as __doc__) |
| 35 | func_globals global namespace in which this function was defined |
| 36 | func_name (same as __name__) |
| 37 | |
| 38 | """ |
| 39 | return isinstance(object, types.FunctionType) |
| 40 | |
| 41 | def iscode(object): |
| 42 | """Return true if the object is a code object. |
no outgoing calls
no test coverage detected