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

Method _is_routine

Lib/doctest.py:1000–1009  ·  view source on GitHub ↗

Safely unwrap objects and determine if they are functions.

(self, obj)

Source from the content-addressed store, hash-verified

998 raise ValueError("object must be a class or function")
999
1000 def _is_routine(self, obj):
1001 """
1002 Safely unwrap objects and determine if they are functions.
1003 """
1004 maybe_routine = obj
1005 try:
1006 maybe_routine = inspect.unwrap(maybe_routine)
1007 except ValueError:
1008 pass
1009 return inspect.isroutine(maybe_routine)
1010
1011 def _find(self, tests, obj, name, module, source_lines, globs, seen):
1012 """

Callers 1

_findMethod · 0.95

Calls 1

unwrapMethod · 0.45

Tested by

no test coverage detected