MCPcopy Index your code
hub / github.com/python/cpython / __init__

Method __init__

Lib/functools.py:1023–1028  ·  view source on GitHub ↗
(self, func)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

singledispatchFunction · 0.85

Tested by

no test coverage detected