[Python-Dev] Cycle collection enhancement idea
eyal.lotem at gmail.com
Sun Jun 29 13:33:28 CEST 2008
On Jun 29, 7:52 am, "Guido van Rossum" <gu... at python.org> wrote:
> On Sat, Jun 28, 2008 at 5:39 PM, Greg Ewing <greg.ew... at canterbury.ac.nz> wrote:
> > Nick Coghlan wrote:
> >> It's a fact of Python development: __del__ methods cannot safely reference
> >> module globals, because those globals may be gone by the time that method is
> >> invoked.
> > Speaking of this, has there been any more thought given
> > to the idea of dropping the module clearing and just
> > relying on cyclic GC?
> No, but it is an intriguing thought nevertheless. The module clearing
> causes nothing but trouble...
This is exactly what my post tried to address.
I assumed it was clear that module clearing is the wrong solution, and
that it was also clear that due to the cycles I mentioned
global), all globals that have a __del__ will not be collectible.
Therefore, I proposed a solution to cycles with a __del__ in them.
Only with this solution it is possible to replace module clearing with
normal garbage collection.
> --Guido van Rossum (home page:http://www.python.org/~guido/)
> Python-Dev mailing list
> Python-... at python.orghttp://mail.python.org/mailman/listinfo/python-dev
More information about the Python-Dev