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

Function _is_bound_method

Lib/pydoc.py:219–229  ·  view source on GitHub ↗

Returns True if fn is a bound method, regardless of whether fn was implemented in Python or in C.

(fn)

Source from the content-addressed store, hash-verified

217 return _re_stripid.sub(r'\1', text)
218
219def _is_bound_method(fn):
220 """
221 Returns True if fn is a bound method, regardless of whether
222 fn was implemented in Python or in C.
223 """
224 if inspect.ismethod(fn):
225 return True
226 if inspect.isbuiltin(fn):
227 self = getattr(fn, '__self__', None)
228 return not (inspect.ismodule(self) or (self is None))
229 return False
230
231
232def allmethods(cl):

Callers 3

classify_class_attrsFunction · 0.85
docroutineMethod · 0.85
docroutineMethod · 0.85

Calls 2

ismethodMethod · 0.80
ismoduleMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…