Hi

I've tried (and failed) to find what GC details (especially finalizer
semantics) are CPython only and which ones are not. The best I could
find was the documentation of __del__ here:
http://docs.python.org/2/reference/datamodel.html

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.

* 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?

Overall, the __del__ is baaad.

Cheers,
fijal
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to