[Python-ideas] Why not break cycles with one __del__?

Benjamin Peterson benjamin at python.org
Mon Sep 13 23:31:45 CEST 2010


Antoine Pitrou <solipsis at ...> writes:

> 
> On Mon, 13 Sep 2010 19:22:02 +0000 (UTC)
> Benjamin <benjamin at ...> wrote:
> > Tim Peters <tim.peters at ...> writes:
> > > Of course it doesn't _have_ to be that way.  Nobody cared enough yet
> > > to add a pile of new code to special-case cycles with a single
> > > __del__.
> > 
> > And hopefully no one will. That would be very brittle. 
> 
> Why would it be?

Because if you're cycle suddenly had more than one __del__, it would stop being
collected.







More information about the Python-ideas mailing list