mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Rename importlib.util.ModuleManager to module_to_load so that the name
explains better what the context manager is providing.
This commit is contained in:
parent
335ab5b66f
commit
357c9fb055
6 changed files with 3568 additions and 3547 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue