This change makes imputil more closely emulate the standard import

mechanism to support self-modifying modules.
This commit is contained in:
Thomas Heller 2001-02-12 09:17:06 +00:00
parent 76c066b103
commit bfae1964c8

View File

@ -282,7 +282,8 @@ class Importer:
if not is_module:
exec code in module.__dict__
return module
# fetch from sys.modules instead of returning module directly.
return sys.modules[fqname]
def _load_tail(self, m, parts):
"""Import the rest of the modules, down from the top-level module.