summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/importlib.rst48
1 files changed, 47 insertions, 1 deletions
diff --git a/Doc/library/importlib.rst b/Doc/library/importlib.rst
index 3f33cfb..ea56981 100644
--- a/Doc/library/importlib.rst
+++ b/Doc/library/importlib.rst
@@ -61,7 +61,7 @@ providing custom importers can be found in :pep:`302`.
Functions
---------
-.. function:: __import__(name, globals={}, locals={}, fromlist=\[\], level=0)
+.. function:: __import__(name, globals={}, locals={}, fromlist=list(), level=0)
An implementation of the built-in :func:`__import__` function. See the
built-in function's documentation for usage instructions.
@@ -76,3 +76,49 @@ Functions
package name (e.g. ``import_module('..mod', 'pkg.subpkg')`` will import
``pkg.mod``). The specified module will be inserted into
:data:`sys.modules` and returned.
+
+
+:mod:`importlib.machinery` -- Importers and path hooks
+------------------------------------------------------
+
+.. module:: importlib.machinery
+ :synopsis: Importers and path hooks
+
+This module contains the various objects that help :keyword:`import`
+find and load modules.
+
+.. class:: BuiltinImporter
+
+ :term:`Importer` for built-in modules. All known built-in modules are
+ listed in :data:`sys.builtin_module_names`.
+
+ Only class methods are defined by this class to alleviate the need for
+ instantiation.
+
+ .. method:: find_module(fullname, path=None)
+
+ Class method that allows this class to be a :term:`finder` for built-in
+ modules.
+
+ .. method:: load_module(fullname)
+
+ Class method that allows this class to be a :term:`loader` for built-in
+ modules.
+
+
+.. class:: FrozenImporter
+
+ :term:`Importer` for frozen modules.
+
+ Only class methods are defined by this class to alleviate the need for
+ instantiation.
+
+ .. method:: find_module(fullname, path=None)
+
+ Class method that allows this class to be a :term:`finder` for frozen
+ modules.
+
+ .. method:: load_module(fullname)
+
+ Class method that allows this class to be a :term:`loader` for frozen
+ modules.