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

Method __call__

Lib/weakref.py:487–492  ·  view source on GitHub ↗

If alive then mark as dead and return func(*args, **kwargs); otherwise return None

(self, _=None)

Source from the content-addressed store, hash-verified

485 finalize._dirty = True
486
487 def __call__(self, _=None):
488 """If alive then mark as dead and return func(*args, **kwargs);
489 otherwise return None"""
490 info = self._registry.pop(self, None)
491 if info and not self._shutdown:
492 return info.func(*info.args, **(info.kwargs or {}))
493
494 def detach(self):
495 """If alive then mark as dead and return (obj, func, args, kwargs);

Callers 1

__call__Method · 0.45

Calls 2

popMethod · 0.45
funcMethod · 0.45

Tested by

no test coverage detected