summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-05-23 02:11:58 (GMT)
committerGitHub <noreply@github.com>2022-05-23 02:11:58 (GMT)
commit936eefcb820a02e6fad3c8128e89494e6b958717 (patch)
tree7c72fc136a2bb26c4916e6da46a1a9bffef28676
parent619a67cc0675556065d7bb137727c029fff7d5f8 (diff)
downloadcpython-936eefcb820a02e6fad3c8128e89494e6b958717.zip
cpython-936eefcb820a02e6fad3c8128e89494e6b958717.tar.gz
cpython-936eefcb820a02e6fad3c8128e89494e6b958717.tar.bz2
gh-92994: Clarify importlib "check" example (GH-92995)
Fixes GH-92994 (cherry picked from commit e39cd765610c9099da3b5595186ad16223b670b0) Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
-rw-r--r--Doc/library/importlib.rst3
1 files changed, 3 insertions, 0 deletions
diff --git a/Doc/library/importlib.rst b/Doc/library/importlib.rst
index c9fb63b..85c2347 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