Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Doc/library/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1910,7 +1910,8 @@ are always available. They are listed here in alphabetical order.
This is an advanced function that is not needed in everyday Python
programming, unlike :func:`importlib.import_module`.

This function is invoked by the :keyword:`import` statement. It can be
This function is invoked by the :keyword:`import` statement.
If the module cannot be imported, :exc:`ImportError` is raised. It can be
replaced (by importing the :mod:`builtins` module and assigning to
``builtins.__import__``) in order to change semantics of the
:keyword:`!import` statement, but doing so is **strongly** discouraged as it
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/importlib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Functions
specified in relative terms, then the *package* argument must be set to
the name of the package which is to act as the anchor for resolving the
package name (e.g. ``import_module('..mod', 'pkg.subpkg')`` will import
``pkg.mod``).
``pkg.mod``). If the module cannot be imported, :exc:`ImportError` is raised.

The :func:`import_module` function acts as a simplifying wrapper around
:func:`importlib.__import__`. This means all semantics of the function are
Expand Down