[Python-checkins] (3.1): Explicitly mention that people should not depend on immediate
gregory.p.smith
python-checkins at python.org
Thu Mar 10 20:35:31 CET 2011
http://hg.python.org/cpython/rev/7ba1be6e44c9
changeset: 68350:7ba1be6e44c9
branch: 3.1
parent: 68346:cb3a925de1bd
user: Gregory P. Smith <greg at krypto.org>
date: Thu Mar 10 11:25:44 2011 -0800
summary:
Explicitly mention that people should not depend on immediate
finalization of objects in the language reference.
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
@@ -69,6 +69,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 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
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list