summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2009-03-15 01:41:33 (GMT)
committerBrett Cannon <bcannon@gmail.com>2009-03-15 01:41:33 (GMT)
commita113ac58be3ee73d1382af3bfbf47b7ed5e5f5a9 (patch)
tree78b2a6b9730046c61c3d76c7cb7b7f195c695136 /Doc
parent7aa21f75c1d9ac36f1ab7e00aa9d0048ef61476d (diff)
downloadcpython-a113ac58be3ee73d1382af3bfbf47b7ed5e5f5a9.zip
cpython-a113ac58be3ee73d1382af3bfbf47b7ed5e5f5a9.tar.gz
cpython-a113ac58be3ee73d1382af3bfbf47b7ed5e5f5a9.tar.bz2
Implement InspectLoader for BuiltinImporter.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/importlib.rst21
1 files changed, 11 insertions, 10 deletions
diff --git a/Doc/library/importlib.rst b/Doc/library/importlib.rst
index 3b2a288..92fb787 100644
--- a/Doc/library/importlib.rst
+++ b/Doc/library/importlib.rst
@@ -175,11 +175,12 @@ are also provided to help in implementing the core ABCs.
An abstract base class for a :term:`loader` which implements the optional
:pep:`302` protocol for loaders which inspect modules.
- .. method:: is_package(fullname)
+ .. method:: get_code(fullname)
- An abstract method to return a true value if the module is a package, a
- false value otherwise. :exc:`ImportError` is raised if the
- :term:`loader` cannot find the module.
+ An abstract method to return the :class:`code` object for a module.
+ :keyword:`None` is returned if the module does not have a code object
+ (e.g. built-in module). :exc:`ImportError` is raised if loader cannot
+ find the requested module.
.. method:: get_source(fullname)
@@ -188,12 +189,11 @@ are also provided to help in implementing the core ABCs.
source is available (e.g. a built-in module). Raises :exc:`ImportError`
if the loader cannot find the module specified.
- .. method:: get_code(fullname)
+ .. method:: is_package(fullname)
- An abstract method to return the :class:`code` object for a module.
- :keyword:`None` is returned if the module does not have a code object
- (e.g. built-in module). :exc:`ImportError` is raised if loader cannot
- find the requested module.
+ An abstract method to return a true value if the module is a package, a
+ false value otherwise. :exc:`ImportError` is raised if the
+ :term:`loader` cannot find the module.
.. class:: PyLoader
@@ -274,7 +274,8 @@ find and load modules.
An :term:`importer` for built-in modules. All known built-in modules are
listed in :data:`sys.builtin_module_names`. This class implements the
- :class:`importlib.abc.Finder` and :class:`importlib.abc.Loader` ABCs.
+ :class:`importlib.abc.Finder` and :class:`importlib.abc.InspectLoader`
+ ABCs.
Only class methods are defined by this class to alleviate the need for
instantiation.