Skip to content

Commit 936eefc

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 619a67c commit 936eefc

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
@@ -1749,6 +1749,9 @@ Checking if a module can be imported
17491749

17501750
If you need to find out if a module can be imported without actually doing the
17511751
import, then you should use :func:`importlib.util.find_spec`.
1752+
1753+
Note that if ``name`` is a submodule (contains a dot),
1754+
:func:`importlib.util.find_spec` will import the parent module.
17521755
::
17531756

17541757
import importlib.util

0 commit comments

Comments
 (0)