diff options
author | Brett Cannon <brett@python.org> | 2016-02-21 02:45:56 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2016-02-21 02:45:56 (GMT) |
commit | 4cbab346dfcea1f221bfb0811fabed8dfb435e7e (patch) | |
tree | aa6d2c6d7acb730c2cf3699b8dee719bb8e32447 /Doc/library/importlib.rst | |
parent | fe1941ebf87de4fe9761d81b477c67964eea982e (diff) | |
download | cpython-4cbab346dfcea1f221bfb0811fabed8dfb435e7e.zip cpython-4cbab346dfcea1f221bfb0811fabed8dfb435e7e.tar.gz cpython-4cbab346dfcea1f221bfb0811fabed8dfb435e7e.tar.bz2 |
Issue #26397: Update an importlib example to use util.module_from_spec() instead of create_module()
Diffstat (limited to 'Doc/library/importlib.rst')
-rw-r--r-- | Doc/library/importlib.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/importlib.rst b/Doc/library/importlib.rst index 4d429bb..17a65aa 100644 --- a/Doc/library/importlib.rst +++ b/Doc/library/importlib.rst @@ -1389,7 +1389,7 @@ Python 3.6 and newer for other parts of the code). break else: raise ImportError(f'No module named {absolute_name!r}') - module = spec.loader.create_module(spec) + module = util.module_from_spec(spec) spec.loader.exec_module(module) sys.modules[absolute_name] = module if path is not None: |