On Tue, 17 Apr 2012 17:22:57 +0000 Kristj?n Valur J?nsson wrote:
We are all consenting adults. Everything is allowed - you just have to live with
the consequences.
Well, we specifically decided that objects with __del__ methods that are part of a cycle cannot be run.We are all consenting adults. Everything is allowed - you just have to live with
the consequences.
The same reasoning was applied to generators, if they are in a certain state.
What makes iobase so special that its 'close' method can be run even if it is part of a cycle?
of a reference cycle would be a PITA and a serious regression for many
applications, I think.
Why not allow it for all objects, then?
I'm not the author of the original GC design. Perhaps it wasdeliberately conservative at the time? I think PyPy has a more tolerant
solution for finalizers in reference cycles, perhaps they can explain it
here.
Regards
Antoine.
