summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorShantanu <12621235+hauntsaninja@users.noreply.github.com>2022-05-23 01:53:24 (GMT)
committerGitHub <noreply@github.com>2022-05-23 01:53:24 (GMT)
commite39cd765610c9099da3b5595186ad16223b670b0 (patch)
treef20f501b4c19d36e5211f6feff998c1345dcbd5c /Doc
parentb7a6610bc88dfecdd943e8d2817f7cd6b85fb740 (diff)
downloadcpython-e39cd765610c9099da3b5595186ad16223b670b0.zip
cpython-e39cd765610c9099da3b5595186ad16223b670b0.tar.gz
cpython-e39cd765610c9099da3b5595186ad16223b670b0.tar.bz2
gh-92994: Clarify importlib "check" example (#92995)
Fixes #92994
Diffstat (limited to 'Doc')
-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 f195322..aac556e 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