MCPcopy Index your code
hub / github.com/RustPython/RustPython / __init__

Method __init__

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

callableFunction · 0.85
hasattrFunction · 0.85
singledispatchFunction · 0.85

Tested by

no test coverage detected