summaryrefslogtreecommitdiffstats
path: root/Doc/library/importlib.rst
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2012-08-02 13:03:58 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2012-08-02 13:03:58 (GMT)
commit4941774f59ae808a764e29e09abfedf6fc199ed3 (patch)
treecd292c1521df0575fedbf7a5dca6a874f110b84e /Doc/library/importlib.rst
parente3376ef6d218b9df08fbe218eba4f3ba0602333a (diff)
downloadcpython-4941774f59ae808a764e29e09abfedf6fc199ed3.zip
cpython-4941774f59ae808a764e29e09abfedf6fc199ed3.tar.gz
cpython-4941774f59ae808a764e29e09abfedf6fc199ed3.tar.bz2
Issue #15502: Bring the importlib.PathFinder docs and docstring more in line with the new import system documentation, and fix various parts of the new docs that weren't quite right given PEP 420 or were otherwise a bit misleading. Also note the key terminology problem still being discussed in the issue
Diffstat (limited to 'Doc/library/importlib.rst')
-rw-r--r--Doc/library/importlib.rst15
1 files changed, 5 insertions, 10 deletions
diff --git a/Doc/library/importlib.rst b/Doc/library/importlib.rst
index 06d997f..0081e04 100644
--- a/Doc/library/importlib.rst
+++ b/Doc/library/importlib.rst
@@ -606,7 +606,7 @@ find and load modules.
.. class:: WindowsRegistryFinder
:term:`Finder` for modules declared in the Windows registry. This class
- implements the :class:`importlib.abc.MetaPathFinder` ABC.
+ implements the :class:`importlib.abc.Finder` ABC.
Only class methods are defined by this class to alleviate the need for
instantiation.
@@ -616,14 +616,8 @@ find and load modules.
.. class:: PathFinder
- :term:`Finder` for :data:`sys.path`. This class implements the
- :class:`importlib.abc.MetaPathFinder` ABC.
-
- This class does not perfectly mirror the semantics of :keyword:`import` in
- terms of :data:`sys.path`. No implicit path hooks are assumed for
- simplification of the class and its semantics. This implies that when
- ``None`` is found in :data:`sys.path_importer_cache` that it is simply
- ignored instead of implying a default finder.
+ :term:`Finder` for :data:`sys.path` and package ``__path__`` attributes.
+ This class implements the :class:`importlib.abc.MetaPathFinder` ABC.
Only class methods are defined by this class to alleviate the need for
instantiation.
@@ -639,7 +633,8 @@ find and load modules.
:data:`sys.path_importer_cache`, then :data:`sys.path_hooks` is
searched for a finder for the path entry and, if found, is stored in
:data:`sys.path_importer_cache` along with being queried about the
- module. If no finder is ever found then ``None`` is returned.
+ module. If no finder is ever found then ``None`` is both stored in
+ the cache and returned.
.. class:: FileFinder(path, \*loader_details)