(self, obj, cls=None)
| 391 | return _method |
| 392 | |
| 393 | def __get__(self, obj, cls=None): |
| 394 | get = getattr(self.func, "__get__", None) |
| 395 | result = None |
| 396 | if get is not None: |
| 397 | new_func = get(obj, cls) |
| 398 | if new_func is not self.func: |
| 399 | # Assume __get__ returning something new indicates the |
| 400 | # creation of an appropriate callable |
| 401 | result = partial(new_func, *self.args, **self.keywords) |
| 402 | try: |
| 403 | result.__self__ = new_func.__self__ |
| 404 | except AttributeError: |
| 405 | pass |
| 406 | if result is None: |
| 407 | # If the underlying descriptor didn't do anything, treat this |
| 408 | # like an instance method |
| 409 | result = self._make_unbound_method().__get__(obj, cls) |
| 410 | return result |
| 411 | |
| 412 | @property |
| 413 | def __isabstractmethod__(self): |
no test coverage detected