[issue12554] Failed imports clean up module, but not sub modules

R. David Murray report at bugs.python.org
Wed Jul 13 21:51:38 CEST 2011


R. David Murray <rdmurray at bitdance.com> added the comment:

That can't be done.  If an import fails, it fails.  But if it succeeds, the module is loaded, and there is no reason to unload it.  After all, import in python is idempotent (doing it a second time has no effect other than adding the name to the local namespace).  So the import in the module that failed to load may not be the first, and unloading it would break other modules using it.

----------
nosy: +r.david.murray
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12554>
_______________________________________


More information about the Python-bugs-list mailing list