If alive then mark as dead and return (obj, func, args, kwargs); otherwise return None
(self)
| 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); |