MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / detach

Method detach

tools/python-3.11.9-amd64/Lib/weakref.py:592–598  ·  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

590 return info.func(*info.args, **(info.kwargs or {}))
591
592 def detach(self):
593 """If alive then mark as dead and return (obj, func, args, kwargs);
594 otherwise return None"""
595 info = self._registry.get(self)
596 obj = info and info.weakref()
597 if obj is not None and self._registry.pop(self, None):
598 return (obj, info.func, info.args, info.kwargs or {})
599
600 def peek(self):
601 """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