summaryrefslogtreecommitdiffstats
path: root/Doc/reference
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2011-03-10 19:25:44 (GMT)
committerGregory P. Smith <greg@krypto.org>2011-03-10 19:25:44 (GMT)
commitc60137b2729745defea74e7f957d8e11ba73132f (patch)
tree6a573a0d6f885ea3d7f41417923a5a90e19dd3eb /Doc/reference
parent2d1e88a4d1ccc1096afea8603a6e39251a6cff3d (diff)
downloadcpython-c60137b2729745defea74e7f957d8e11ba73132f.zip
cpython-c60137b2729745defea74e7f957d8e11ba73132f.tar.gz
cpython-c60137b2729745defea74e7f957d8e11ba73132f.tar.bz2
Explicitly mention that people should not depend on immediate
finalization of objects in the language reference.
Diffstat (limited to 'Doc/reference')
-rw-r--r--Doc/reference/datamodel.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index 5c32f85..1126944 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -69,6 +69,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 write code that depends on immediate finalization of objects
+ when they become unreachable (ex: always close your 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