[Python-Dev] Marking GC details as CPython-only

Antoine Pitrou solipsis at pitrou.net
Wed Feb 13 20:25:40 CET 2013

On Wed, 13 Feb 2013 20:48:08 +0200
Maciej Fijalkowski <fijall at gmail.com> wrote:
> Things were pypy differs:
> * finalizers in pypy will be called only once, even if the object is
> resurrected. I'm not sure if this is detail or we're just plain
> incompatible.

I think this should be a detail.

> * pypy breaks cycles and runs finalizers in random order (but
> topologically correct), hence gc.garbage is always empty. I *think*
> this part is really just an implementation detail


> * we're discussing right now about running multiple finalizers. We
> want to run them in order, but if there is a link a -> b and a becomes
> unreachable, we want to reserve the right to call finalizer a then
> finalizer b, even if a.__del__ resurrects a. What do you think?

I think resurrecting objects from __del__ is crazy, so IMO what you
suggest is fine.



More information about the Python-Dev mailing list