diff --git a/Doc/library/importlib.rst b/Doc/library/importlib.rst index f19532213940e2..aac556e2c68d94 100644 --- a/Doc/library/importlib.rst +++ b/Doc/library/importlib.rst @@ -1250,6 +1250,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