mirror of
https://github.com/python/cpython.git
synced 2024-11-25 02:44:06 +08:00
This change makes imputil more closely emulate the standard import
mechanism to support self-modifying modules.
This commit is contained in:
parent
76c066b103
commit
bfae1964c8
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user