mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00: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
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue