Kaydet (Commit) bfae1964 authored tarafından Thomas Heller's avatar Thomas Heller

This change makes imputil more closely emulate the standard import

mechanism to support self-modifying modules.
üst 76c066b1
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment