[Python-Dev] regrtest.py mystery

Guido van Rossum guido@python.org
Mon, 17 Dec 2001 17:24:31 -0500


> However, I will add that if I *did* need an unload for anything,
> I would think the XlispStat semantics: unloading the module
> immediately and making any dangling references into exceptions,
> or replacing them with references to a reloaded module,
> would seem to be more useful than not really unloading it until
> all of the references are decremented (if ever) and then
> unloading.
> 
> I can't think of a case where I would want to unload a module,
> where I would not want a dangling reference to something in that
> module to generate an exception.

Python doesn't let you replace a reference to an object with something
else -- except in special cases (e.g. with explicit weak refs) there's
no way to know where references to an object might exist.

So that's not a useful idea, alas.

--Guido van Rossum (home page: http://www.python.org/~guido/)