mirror of
https://github.com/python/cpython.git
synced 2025-10-01 04:42:10 +00:00
Fix ModuleNotFoundError typo in import reference
This commit is contained in:
parent
c7ac7280c3
commit
c138d84b8d
1 changed files with 1 additions and 1 deletions
|
@ -890,7 +890,7 @@ import statements within that module.
|
||||||
|
|
||||||
To selectively prevent import of some modules from a hook early on the
|
To selectively prevent import of some modules from a hook early on the
|
||||||
meta path (rather than disabling the standard import system entirely),
|
meta path (rather than disabling the standard import system entirely),
|
||||||
it is sufficient to raise :exc:`ModuleNoFoundError` directly from
|
it is sufficient to raise :exc:`ModuleNotFoundError` directly from
|
||||||
:meth:`~importlib.abc.MetaPathFinder.find_spec` instead of returning
|
:meth:`~importlib.abc.MetaPathFinder.find_spec` instead of returning
|
||||||
``None``. The latter indicates that the meta path search should continue,
|
``None``. The latter indicates that the meta path search should continue,
|
||||||
while raising an exception terminates it immediately.
|
while raising an exception terminates it immediately.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue