MCPcopy Create free account
hub / github.com/numpy/numpy / isfunction

Function isfunction

numpy/_utils/_inspect.py:26–39  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

24 return isinstance(object, types.MethodType)
25
26def 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
41def iscode(object):
42 """Return true if the object is a code object.

Callers 2

decorate_methodsFunction · 0.90
getargspecFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected