From: Gregory P. Smith Date: Thu, 10 Mar 2011 19:49:27 +0000 (-0800) Subject: Explicitly mention that people should not depend on finalization of X-Git-Tag: v2.7.2rc1~263 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=28d57c0d5cb52d09091949e0494e19bd2f0459f0;p=thirdparty%2FPython%2Fcpython.git Explicitly mention that people should not depend on finalization of objects to happen immediately. --- diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index ddffbb3f421b..41f6a77cf512 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -66,6 +66,8 @@ are still reachable. containing circular references. See the documentation of the :mod:`gc` module for information on controlling the collection of cyclic garbage. Other implementations act differently and CPython may change. + Do not depend on immediate finalization of objects when they become + unreachable (ex: always close files). Note that the use of the implementation's tracing or debugging facilities may keep objects alive that would normally be collectable. Also note that catching