]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Explicitly mention that people should not depend on finalization of
authorGregory P. Smith <greg@krypto.org>
Thu, 10 Mar 2011 19:49:27 +0000 (11:49 -0800)
committerGregory P. Smith <greg@krypto.org>
Thu, 10 Mar 2011 19:49:27 +0000 (11:49 -0800)
objects to happen immediately.

Doc/reference/datamodel.rst

index ddffbb3f421bfc14e6ab8bceedb021843efbca42..41f6a77cf51200c1b2c3cfa8c53da90c1d7f6d24 100644 (file)
@@ -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