MCPcopy Index your code
hub / github.com/python/cpython / isroutine

Function isroutine

Lib/inspect.py:445–452  ·  view source on GitHub ↗

Return true if the object is any kind of function or method.

(object)

Source from the content-addressed store, hash-verified

443 return isinstance(object, types.MethodWrapperType)
444
445def isroutine(object):
446 """Return true if the object is any kind of function or method."""
447 return (isbuiltin(object)
448 or isfunction(object)
449 or ismethod(object)
450 or ismethoddescriptor(object)
451 or ismethodwrapper(object)
452 or isinstance(object, functools._singledispatchmethod_get))
453
454def isabstract(object):
455 """Return true if the object is an abstract base class (ABC)."""

Callers 1

classify_class_attrsFunction · 0.85

Calls 5

isbuiltinFunction · 0.85
isfunctionFunction · 0.85
ismethodFunction · 0.85
ismethoddescriptorFunction · 0.85
ismethodwrapperFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…