MCPcopy Index your code
hub / github.com/RustPython/RustPython / _is_bound_method

Function _is_bound_method

Lib/pydoc.py:284–294  ·  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

282 return _re_stripid.sub(r'\1', text)
283
284def _is_bound_method(fn):
285 """
286 Returns True if fn is a bound method, regardless of whether
287 fn was implemented in Python or in C.
288 """
289 if inspect.ismethod(fn):
290 return True
291 if inspect.isbuiltin(fn):
292 self = getattr(fn, '__self__', None)
293 return not (inspect.ismodule(self) or (self is None))
294 return False
295
296
297def allmethods(cl):

Callers 3

classify_class_attrsFunction · 0.85
docroutineMethod · 0.85
docroutineMethod · 0.85

Calls 2

getattrFunction · 0.85
ismethodMethod · 0.80

Tested by

no test coverage detected