importlib.import_module is better these days

This commit is contained in:
Benjamin Peterson 2009-05-14 00:33:10 +00:00
parent d547144f0f
commit 51d06abc99
1 changed files with 2 additions and 6 deletions

View File

@ -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: