summaryrefslogtreecommitdiffstats
path: root/Doc/library/importlib.rst
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2013-05-30 21:31:47 (GMT)
committerBrett Cannon <brett@python.org>2013-05-30 21:31:47 (GMT)
commit357c9fb0556e0ec9d440a4874b6af19d7b0bee7b (patch)
tree9eaf7e79f980770c75961a06ce92a8f647b10dad /Doc/library/importlib.rst
parent335ab5b66f432ae3713840ed2403a11c368f5406 (diff)
downloadcpython-357c9fb0556e0ec9d440a4874b6af19d7b0bee7b.zip
cpython-357c9fb0556e0ec9d440a4874b6af19d7b0bee7b.tar.gz
cpython-357c9fb0556e0ec9d440a4874b6af19d7b0bee7b.tar.bz2
Rename importlib.util.ModuleManager to module_to_load so that the name
explains better what the context manager is providing.
Diffstat (limited to 'Doc/library/importlib.rst')
-rw-r--r--Doc/library/importlib.rst13
1 files changed, 7 insertions, 6 deletions
diff --git a/Doc/library/importlib.rst b/Doc/library/importlib.rst
index 137721e..d6ece97 100644
--- a/Doc/library/importlib.rst
+++ b/Doc/library/importlib.rst
@@ -789,12 +789,13 @@ an :term:`importer`.
.. versionadded:: 3.3
-.. class:: ModuleManager(name)
+.. function:: module_to_load(name)
- A :term:`context manager` which provides the module to load. The module will
- either come from :attr:`sys.modules` in the case of reloading or a fresh
- module if loading a new module. Proper cleanup of :attr:`sys.modules` occurs
- if the module was new and an exception was raised.
+ Returns a :term:`context manager` which provides the module to load. The
+ module will either come from :attr:`sys.modules` in the case of reloading or
+ a fresh module if loading a new module. Proper cleanup of
+ :attr:`sys.modules` occurs if the module was new and an exception was
+ raised.
.. versionadded:: 3.4
@@ -823,7 +824,7 @@ an :term:`importer`.
in :data:`sys.modules` then it is left alone.
.. note::
- :class:`ModuleManager` subsumes the module management aspect of this
+ :func:`module_to_load` subsumes the module management aspect of this
decorator.
.. versionchanged:: 3.3