Mention the new bit in the GC header

This commit is contained in:
Antoine Pitrou 2013-05-17 23:30:10 +02:00
parent fa3df1063c
commit c41f2a4db4
1 changed files with 6 additions and 1 deletions

View File

@ -82,7 +82,7 @@ Impact
While this PEP discusses CPython-specific implementation details, the
change in finalization semantics is expected to affect the Python
ecosystem as a whole. In particular, this PEP obsoletes the current
guideline that "objects with a __del__ method should not be part of a
guideline that "objects with a ``__del__`` method should not be part of a
reference cycle".
@ -170,6 +170,11 @@ they are not finalized and end up in ``gc.garbage``. However, a non-NULL
``tp_del`` is not encountered anymore in the CPython source tree (except
for testing purposes).
On the internal side, a bit is reserved in the GC header for GC-managed
objects to signal that they were finalized. This helps avoid finalizing
an object twice (and, especially, finalizing a CT object after it was broken
by the GC).
Discussion
==========