
It’s *needed* when multiple interpreters share them. On Thu, Dec 16, 2021 at 14:03 Jim J. Jewett <jimjjewett@gmail.com> wrote:
Guido van Rossum wrote:
On Wed, Dec 15, 2021 at 6:57 PM Jim J. Jewett jimjjewett@gmail.com wrote:
Immortal objects shouldn't be reclaimed by garbage collection, but they still count as potential external roots for non-cyclic liveness. So everything referenced by an immortal object should also be made immortal
Why? As long as you can get a list of all immortal objects (and a traversal function from each), this is just an extra step (annoying, but tolerable) that removes a bunch of objects from the pool of potential garbage before you even begin looking for cycles.
-- even its type. Hence immortal objects must be immutable.
This is probably a good idea, since avoiding changes also avoids races and Copy on Write and cache propagation, etc ... but I don't see why it is *needed*, rather than helpful.
-jJ _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-leave@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/4KY5XSHR... Code of Conduct: http://python.org/psf/codeofconduct/
-- --Guido (mobile)