mirror of
https://github.com/python/cpython.git
synced 2025-10-01 12:52:18 +00:00
Minor doc cleanup.
This commit is contained in:
parent
be52d507d2
commit
75321e8379
1 changed files with 6 additions and 6 deletions
|
@ -487,7 +487,7 @@ find and load modules.
|
||||||
Class method that attempts to find a :term:`loader` for the module
|
Class method that attempts to find a :term:`loader` for the module
|
||||||
specified by *fullname* on :data:`sys.path` or, if defined, on
|
specified by *fullname* on :data:`sys.path` or, if defined, on
|
||||||
*path*. For each path entry that is searched,
|
*path*. For each path entry that is searched,
|
||||||
:data:`sys.path_importer_cache` is checked. If an non-false object is
|
:data:`sys.path_importer_cache` is checked. If a non-false object is
|
||||||
found then it is used as the :term:`finder` to look for the module
|
found then it is used as the :term:`finder` to look for the module
|
||||||
being searched for. If no entry is found in
|
being searched for. If no entry is found in
|
||||||
:data:`sys.path_importer_cache`, then :data:`sys.path_hooks` is
|
:data:`sys.path_importer_cache`, then :data:`sys.path_hooks` is
|
||||||
|
@ -500,7 +500,7 @@ find and load modules.
|
||||||
---------------------------------------------------
|
---------------------------------------------------
|
||||||
|
|
||||||
.. module:: importlib.util
|
.. module:: importlib.util
|
||||||
:synopsis: Importers and path hooks
|
:synopsis: Utility code for importers
|
||||||
|
|
||||||
This module contains the various objects that help in the construction of
|
This module contains the various objects that help in the construction of
|
||||||
an :term:`importer`.
|
an :term:`importer`.
|
||||||
|
@ -536,7 +536,7 @@ an :term:`importer`.
|
||||||
to set the :attr:`__loader__`
|
to set the :attr:`__loader__`
|
||||||
attribute on loaded modules. If the attribute is already set the decorator
|
attribute on loaded modules. If the attribute is already set the decorator
|
||||||
does nothing. It is assumed that the first positional argument to the
|
does nothing. It is assumed that the first positional argument to the
|
||||||
wrapped method is what :attr:`__loader__` should be set to.
|
wrapped method (i.e. ``self``) is what :attr:`__loader__` should be set to.
|
||||||
|
|
||||||
.. decorator:: set_package
|
.. decorator:: set_package
|
||||||
|
|
||||||
|
@ -547,8 +547,8 @@ an :term:`importer`.
|
||||||
set on and not the module found in :data:`sys.modules`.
|
set on and not the module found in :data:`sys.modules`.
|
||||||
|
|
||||||
Reliance on this decorator is discouraged when it is possible to set
|
Reliance on this decorator is discouraged when it is possible to set
|
||||||
:attr:`__package__` before the execution of the code is possible. By
|
:attr:`__package__` before importing. By
|
||||||
setting it before the code for the module is executed it allows the
|
setting it beforehand the code for the module is executed with the
|
||||||
attribute to be used at the global level of the module during
|
attribute set and thus can be used by global level code during
|
||||||
initialization.
|
initialization.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue