summaryrefslogtreecommitdiffstats
path: root/Doc/glossary.rst
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2015-12-04 23:46:21 (GMT)
committerBrett Cannon <brett@python.org>2015-12-04 23:46:21 (GMT)
commitccddbb186bcaec77f52a8c37d8b3f56de4b871dd (patch)
tree00b9e18d5a507a49fe2f5ed97535d13ba64a4942 /Doc/glossary.rst
parentf4f25fe576ca86a51c8e4f98a801f32879d7a582 (diff)
downloadcpython-ccddbb186bcaec77f52a8c37d8b3f56de4b871dd.zip
cpython-ccddbb186bcaec77f52a8c37d8b3f56de4b871dd.tar.gz
cpython-ccddbb186bcaec77f52a8c37d8b3f56de4b871dd.tar.bz2
Issue #23936: Clarify what finders are.
Thanks to Raúl Cumplido for the bug report and Thomas Kluyver for the patch.
Diffstat (limited to 'Doc/glossary.rst')
-rw-r--r--Doc/glossary.rst22
1 files changed, 16 insertions, 6 deletions
diff --git a/Doc/glossary.rst b/Doc/glossary.rst
index 6808e7a..648c679 100644
--- a/Doc/glossary.rst
+++ b/Doc/glossary.rst
@@ -308,10 +308,14 @@ Glossary
A synonym for :term:`file object`.
finder
- An object that tries to find the :term:`loader` for a module. It must
- implement either a method named :meth:`find_loader` or a method named
- :meth:`find_module`. See :pep:`302` and :pep:`420` for details and
- :class:`importlib.abc.Finder` for an :term:`abstract base class`.
+ An object that tries to find the :term:`loader` for a module that is
+ being imported.
+
+ Since Python 3.3, there are two types of finder: :term:`meta path finders
+ <meta path finder>` for use with :data:`sys.meta_path`, and :term:`path
+ entry finders <path entry finder>` for use with :data:`sys.path_hooks`.
+
+ See :pep:`302`, :pep:`420` and :pep:`451` for much more detail.
floor division
Mathematical division that rounds down to nearest integer. The floor
@@ -593,10 +597,13 @@ Glossary
:class:`collections.OrderedDict` and :class:`collections.Counter`.
meta path finder
- A finder returned by a search of :data:`sys.meta_path`. Meta path
+ A :term:`finder` returned by a search of :data:`sys.meta_path`. Meta path
finders are related to, but different from :term:`path entry finders
<path entry finder>`.
+ See :class:`importlib.abc.MetaPathFinder` for the methods that meta path
+ finders implement.
+
metaclass
The class of a class. Class definitions create a class name, a class
dictionary, and a list of base classes. The metaclass is responsible for
@@ -630,7 +637,7 @@ Glossary
module spec
A namespace containing the import-related information used to load a
- module.
+ module. An instance of :class:`importlib.machinery.ModuleSpec`.
MRO
See :term:`method resolution order`.
@@ -757,6 +764,9 @@ Glossary
(i.e. a :term:`path entry hook`) which knows how to locate modules given
a :term:`path entry`.
+ See :class:`importlib.abc.PathEntryFinder` for the methods that path entry
+ finders implement.
+
path entry hook
A callable on the :data:`sys.path_hook` list which returns a :term:`path
entry finder` if it knows how to find modules on a specific :term:`path