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

Function _is_bound_method

tools/python-3.11.9-amd64/Lib/pydoc.py:247–257  ·  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

245 return _re_stripid.sub(r'\1', text)
246
247def _is_bound_method(fn):
248 """
249 Returns True if fn is a bound method, regardless of whether
250 fn was implemented in Python or in C.
251 """
252 if inspect.ismethod(fn):
253 return True
254 if inspect.isbuiltin(fn):
255 self = getattr(fn, '__self__', None)
256 return not (inspect.ismodule(self) or (self is None))
257 return False
258
259
260def allmethods(cl):

Callers 3

classify_class_attrsFunction · 0.85
docroutineMethod · 0.85
docroutineMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected