Returns True if fn is a bound method, regardless of whether fn was implemented in Python or in C.
(fn)
| 245 | return _re_stripid.sub(r'\1', text) |
| 246 | |
| 247 | def _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 | |
| 260 | def allmethods(cl): |
no outgoing calls
no test coverage detected