What's the public API alternative to _PyObject_GC_IS_TRACKED()?

Marco Sulla Marco.Sulla.Python at gmail.com
Tue Dec 28 02:40:37 EST 2021


Hi, Inada Senpai. So I do not need PyObject_GC_Track on cloning or
merging, or MAINTAIN_TRACKING on insert?

On Tue, 28 Dec 2021 at 07:58, Inada Naoki <songofacandy at gmail.com> wrote:
>
> On Tue, Dec 28, 2021 at 3:31 AM Marco Sulla
> <Marco.Sulla.Python at gmail.com> wrote:
> >
> > I need it since I'm developing an immutable dict. And in dict that
> > function is used.
> >
> > I do not understand why there's no public API for that function. It
> > seems very useful.
> >
>
> I think it is useful only for optimization based on *current* Python internals.
> That's why it is not a public API. If we expose it as public API, it
> makes harder to change Python's GC internals.
>
>
> --
> Inada Naoki  <songofacandy at gmail.com>


More information about the Python-list mailing list