Skip to content

Commit e39cd76

Browse files
authored
gh-92994: Clarify importlib "check" example (#92995)
Fixes #92994
1 parent b7a6610 commit e39cd76

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Doc/library/importlib.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,6 +1250,9 @@ Checking if a module can be imported
12501250

12511251
If you need to find out if a module can be imported without actually doing the
12521252
import, then you should use :func:`importlib.util.find_spec`.
1253+
1254+
Note that if ``name`` is a submodule (contains a dot),
1255+
:func:`importlib.util.find_spec` will import the parent module.
12531256
::
12541257

12551258
import importlib.util

0 commit comments

Comments
 (0)