On Thu, 16 Dec 2021 14:32:05 +1100 Steven D'Aprano <st...@pearwood.info> wrote: > On Wed, Dec 15, 2021 at 02:57:46PM -0800, Guido van Rossum wrote: > > > Another potential issue is that there may be some applications that take > > refcounts at face value (perhaps obtained using sys.getrefcount()). These > > would find that immortal objects have a very large refcount, which might > > surprise them. But technically a very large refcount is totally valid, and > > the kinds of objects that we plan to immortalize are all widely shared -- > > who cares if the refcount for None is 5000 or 1610612736? As long as the > > refcount of *mortal* objects is the same as it was before, this shouldn't > > be a problem. > > I agree with your reasoning. But can we agree to document the presence > and interpretation of the magic bit, so that if anyone actually does > care (for whatever reason, good bad or indifferent) they can mask off > the immortal bit to get the real ref num?
The "real number of references" would not be known for immortal objects. Regards Antoine. _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@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/W67N2OEYKUOIH2A67J5LMY2SZ7C4KMTX/ Code of Conduct: http://python.org/psf/codeofconduct/