diff --git a/Doc/library/importlib.rst b/Doc/library/importlib.rst index c9fb63b75a4718b161a7ef5bd0f41fd2a5398f0f..85c23472e27560444663664a6e66a07df31a2ceb 100644 --- a/Doc/library/importlib.rst +++ b/Doc/library/importlib.rst @@ -1749,6 +1749,9 @@ Checking if a module can be imported If you need to find out if a module can be imported without actually doing the import, then you should use :func:`importlib.util.find_spec`. + +Note that if ``name`` is a submodule (contains a dot), +:func:`importlib.util.find_spec` will import the parent module. :: import importlib.util