(self, func)
| 999 | """ |
| 1000 | |
| 1001 | def __init__(self, func): |
| 1002 | if not callable(func) and not hasattr(func, "__get__"): |
| 1003 | raise TypeError(f"{func!r} is not callable or a descriptor") |
| 1004 | |
| 1005 | self.dispatcher = singledispatch(func) |
| 1006 | self.func = func |
| 1007 | |
| 1008 | def register(self, cls, method=None): |
| 1009 | """generic_method.register(cls, func) -> func |
nothing calls this directly
no test coverage detected