(self, func)
| 1021 | """ |
| 1022 | |
| 1023 | def __init__(self, func): |
| 1024 | if not callable(func) and not hasattr(func, "__get__"): |
| 1025 | raise TypeError(f"{func!r} is not callable or a descriptor") |
| 1026 | |
| 1027 | self.dispatcher = singledispatch(func) |
| 1028 | self.func = func |
| 1029 | |
| 1030 | def register(self, cls, method=None): |
| 1031 | """generic_method.register(cls, func) -> func |
nothing calls this directly
no test coverage detected