importlib.import_module is better these days
This commit is contained in:
parent
d547144f0f
commit
51d06abc99
|
@ -825,12 +825,8 @@ then you will end up importing ``pkg.mod``. If you execute ``from ..subpkg2
|
|||
imprt mod`` from within ``pkg.subpkg1`` you will import ``pkg.subpkg2.mod``.
|
||||
The specification for relative imports is contained within :pep:`328`.
|
||||
|
||||
|
||||
.. index:: builtin: __import__
|
||||
|
||||
The built-in function :func:`__import__` is provided to support applications
|
||||
that determine which modules need to be loaded dynamically; refer to
|
||||
:ref:`built-in-funcs` for additional information.
|
||||
:func:`importlib.import_module` is provided to support applications that
|
||||
determine which modules need to be loaded dynamically.
|
||||
|
||||
|
||||
.. _future:
|
||||
|
|
Loading…
Reference in New Issue