Skip to content

Commit 247e059

Browse files
gh-92994: Clarify importlib "check" example (GH-92995)
Fixes GH-92994 (cherry picked from commit e39cd76) Co-authored-by: Shantanu <[email protected]>
1 parent 25334ca commit 247e059

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)