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

Method detach

Lib/weakref.py:494–500  ·  view source on GitHub ↗

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

(self)

Source from the content-addressed store, hash-verified

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);
496 otherwise return None"""
497 info = self._registry.get(self)
498 obj = info and info.weakref()
499 if obj is not None and self._registry.pop(self, None):
500 return (obj, info.func, info.args, info.kwargs or {})
501
502 def peek(self):
503 """If alive then return (obj, func, args, kwargs);

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected