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

Method __call__

Lib/test/test_descr.py:516–523  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

514 self.dict = dict
515 return self
516 def __call__(self):
517 it = _instance()
518 # Early binding of methods
519 for key in self.dict:
520 if key.startswith("__"):
521 continue
522 setattr(it, key, self.dict[key].__get__(it, self))
523 return it
524 class C(metaclass=M2):
525 def spam(self):
526 return 42

Callers

nothing calls this directly

Calls 3

_instanceClass · 0.85
startswithMethod · 0.45
__get__Method · 0.45

Tested by

no test coverage detected