MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / isfunction

Function isfunction

tools/python-3.11.9-amd64/Lib/inspect.py:378–389  ·  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 __code__ code object containing compiled function bytecode

(object)

Source from the content-addressed store, hash-verified

376 return False
377
378def 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
391def _has_code_flag(f, flag):
392 """Return true if ``f`` is a function (or a method or functools.partial

Callers 10

ismethoddescriptorFunction · 0.85
isdatadescriptorFunction · 0.85
_has_code_flagFunction · 0.85
isroutineFunction · 0.85
_finddocFunction · 0.85
getfileFunction · 0.85
findsourceFunction · 0.85
getclosurevarsFunction · 0.85
_signature_from_functionFunction · 0.85
_signature_from_callableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected