Python 2.0

Salvador Fandiño fandino at usa.net
Mon Jun 7 18:06:16 CEST 1999


Graham Matthews wrote:

> The proposal I gave for adding mark sweep collection on top of reference
> counts will delete non circularly referred objects in precisely the order
> they are now deleted in current Python. That order doesn't appear to
> random for you.
You are right.

> so I don't understand the above comment? As for circularly
> referred data it will be deleted in the order determined by the collector,
> but that's better than current Python which doesn't delete it at all.
If I can't remove objects in the right order I would have to delete it
explicitly the same way I have to do it now with ref counting. Lots of
current __del__ methods will not perform properly and will raise
exceptions if called after deleting related objects.
You could use __del__ methods only for trivial task like freeing
resources. It's an incomplete solution like reference counting is.

 - Salva.




More information about the Python-list mailing list