[Python-Dev] PEP 442: Safe object finalization (original) (raw)

Antoine Pitrou solipsis at pitrou.net
Mon Jun 3 11:53:55 CEST 2013


On Sun, 2 Jun 2013 19:16:17 -0700 Benjamin Peterson <benjamin at python.org> wrote:

2013/5/18 Antoine Pitrou <solipsis at pitrou.net>: > Calling finalizers only once is fine with me, but it would be a change > in behaviour; I don't know if it may break existing code.

I agree with Armin that this is better behavior. (Mostly significantly consistent with weakrefs.)

Keep in mind that it is a limitation of weakrefs, not a feature: you can't "unclear" a weakref.

> (for example, say someone is using del to manage a freelist)

Do you know if it breaks any of the projects you tested it with?

I haven't tested it (yet).

Regards

Antoine.



More information about the Python-Dev mailing list