[docs] [issue19047] Assorted weakref docs improvements
report at bugs.python.org
Thu Sep 19 10:25:12 CEST 2013
Nick Coghlan added the comment:
Changing the title, since I spotted a few other problems as well.
The weakref docs still refer to module globals being set to None during shutdown. That is no longer the case. There are also some assumptions about cycles with __del__ methods not being garbage collected, which is no longer true given PEP 442's improvements to module finalization.
I also realised that the introduction of weakref.finalize and the elimination of the "set globals to None" hack gives Python relatively straightforward module destructors :
import weakref, sys
mod = sys.modules[__name__]
# implicit ref to the module globals from the function body
title: Clarify weakref.finalize objects are kept alive automatically -> Assorted weakref docs improvements
Python tracker <report at bugs.python.org>
More information about the docs