Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f2b5673

Browse files
committed
Explicitly mention that people should not depend on immediate
finalization of objects. HG Enter commit message. Lines beginning with 'HG:' are removed.
2 parents 40dcb1d + c542547 commit f2b5673

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Doc/reference/datamodel.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ are still reachable.
6969
containing circular references. See the documentation of the :mod:`gc`
7070
module for information on controlling the collection of cyclic garbage.
7171
Other implementations act differently and CPython may change.
72+
Do not depend on immediate finalization of objects when they become
73+
unreachable (ex: always close files).
7274

7375
Note that the use of the implementation's tracing or debugging facilities may
7476
keep objects alive that would normally be collectable. Also note that catching

0 commit comments

Comments
 (0)