New GitHub issue #92994 from hauntsaninja:<br>

<hr>

<pre>
The example at https://docs.python.org/3/library/importlib.html#checking-if-a-module-can-be-imported is misleading:

> 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 [importlib.util.find_spec()](https://docs.python.org/3/library/importlib.html#importlib.util.find_spec).

But `importlib.util.find_spec` will import parent modules if a submodule is provided https://docs.python.org/3/library/importlib.html#importlib.util.find_spec

> If name is for a submodule (contains a dot), the parent module is automatically imported.

Users reading this example probably do not expect anything to get imported at all
</pre>

<hr>

<a href="https://github.com/python/cpython/issues/92994">View on GitHub</a>
<p>Labels: docs, expert-importlib</p>
<p>Assignee: </p>