[Python-Dev] regrtest.py mystery

Fred L. Drake, Jr. fdrake@acm.org
Mon, 17 Dec 2001 10:54:51 -0500 (EST)


Barry A. Warsaw writes:
 > Featurette request for Python 2.3: a builtin unload() which Does The
 > Right Thing to unload a module, or raise an exception if the module
 > cannot be unloaded.  Lots and lots of applications would find this
 > useful.

  Useful or not, isn't the basic problem that we haven't been able to
define The Right Thing?  I'd certainly expect a module to be able to
declare in some way that it could not be unloaded, or control how it
gets unloaded.  Perhaps allow Python modules to define an __unload__()
function; when unload() is called on a module, the __unload__() is
called; if that raises an exception, it gets propogated, otherwise the
unload continues if the module still exists in sys.modules.  Not clear
that this would be useful for extensions.


  -Fred

-- 
Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Zope Corporation