mirror of
https://github.com/python/cpython
synced 2024-10-04 19:08:12 +00:00
parent
b7a6610bc8
commit
e39cd76561
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue