diff options
author | Thomas Heller <theller@ctypes.org> | 2001-02-12 09:17:06 (GMT) |
---|---|---|
committer | Thomas Heller <theller@ctypes.org> | 2001-02-12 09:17:06 (GMT) |
commit | bfae1964c8973a78f332d2d3f224eb78748981db (patch) | |
tree | 38b63952da1213fcaab0a5b645c114a66614668a /Lib | |
parent | 76c066b103c23702d328aa9056c65d02abb8a3ac (diff) | |
download | cpython-bfae1964c8973a78f332d2d3f224eb78748981db.zip cpython-bfae1964c8973a78f332d2d3f224eb78748981db.tar.gz cpython-bfae1964c8973a78f332d2d3f224eb78748981db.tar.bz2 |
This change makes imputil more closely emulate the standard import
mechanism to support self-modifying modules.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/imputil.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/imputil.py b/Lib/imputil.py index 3185d7d..2f87d69 100644 --- a/Lib/imputil.py +++ b/Lib/imputil.py @@ -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. |