[Python-checkins] (2.7): Explicitly mention that people should not depend on finalization of

gregory.p.smith python-checkins at python.org
Thu Mar 10 20:50:10 CET 2011


http://hg.python.org/cpython/rev/c4faea5341c9
changeset:   68354:c4faea5341c9
branch:      2.7
parent:      68345:a7412744822d
user:        Gregory P. Smith <greg at krypto.org>
date:        Thu Mar 10 11:49:27 2011 -0800
summary:
  Explicitly mention that people should not depend on finalization of
objects to happen immediately.

files:
  Doc/reference/datamodel.rst

diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -66,6 +66,8 @@
    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

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list