@@ -136,14 +136,14 @@ Importing Modules
136136 such modules have no way to know that the module object is an unknown (and
137137 probably damaged with respect to the module author's intents) state.
138138
139- The module's :attr:`__spec__` and :attr:`__loader__` will be set, if
140- not set already, with the appropriate values. The spec's loader will
141- be set to the module's `` __loader__`` (if set) and to an instance of
142- :class:`~importlib.machinery.SourceFileLoader` otherwise.
139+ The module's :attr:`~module. __spec__` and :attr:`~module. __loader__` will be
140+ set, if not set already, with the appropriate values. The spec's loader
141+ will be set to the module's :attr:`! __loader__` (if set) and to an instance
142+ of :class:`~importlib.machinery.SourceFileLoader` otherwise.
143143
144- The module's :attr:`__file__` attribute will be set to the code object's
145- :attr:`~codeobject.co_filename`. If applicable, :attr:`__cached__` will also
146- be set.
144+ The module's :attr:`~module. __file__` attribute will be set to the code
145+ object's :attr:`~codeobject.co_filename`. If applicable,
146+ :attr:`~module.__cached__` will also be set.
147147
148148 This function will reload the module if it was already imported. See
149149 :c:func:`PyImport_ReloadModule` for the intended way to reload a module.
@@ -155,29 +155,29 @@ Importing Modules
155155 :c:func:`PyImport_ExecCodeModuleWithPathnames`.
156156
157157 .. versionchanged:: 3.12
158- The setting of :attr:`__cached__` and :attr:`__loader__` is
159- deprecated. See :class:`~importlib.machinery.ModuleSpec` for
158+ The setting of :attr:`~module. __cached__` and :attr:`~module. __loader__`
159+ is deprecated. See :class:`~importlib.machinery.ModuleSpec` for
160160 alternatives.
161161
162162
163163.. c:function:: PyObject* PyImport_ExecCodeModuleEx(const char *name, PyObject *co, const char *pathname)
164164
165- Like :c:func: `PyImport_ExecCodeModule `, but the :attr: `__file__ ` attribute of
166- the module object is set to *pathname * if it is non-``NULL ``.
165+ Like :c:func: `PyImport_ExecCodeModule `, but the :attr: `~module. __file__ `
166+ attribute of the module object is set to *pathname * if it is non-``NULL ``.
167167
168168 See also :c:func: `PyImport_ExecCodeModuleWithPathnames `.
169169
170170
171171.. c :function :: PyObject* PyImport_ExecCodeModuleObject (PyObject *name, PyObject *co, PyObject *pathname, PyObject *cpathname)
172172
173- Like :c:func: `PyImport_ExecCodeModuleEx `, but the :attr: `__cached__ `
173+ Like :c:func: `PyImport_ExecCodeModuleEx `, but the :attr: `~module. __cached__ `
174174 attribute of the module object is set to *cpathname * if it is
175175 non-``NULL ``. Of the three functions, this is the preferred one to use.
176176
177177 .. versionadded :: 3.3
178178
179179 .. versionchanged :: 3.12
180- Setting :attr: `__cached__ ` is deprecated. See
180+ Setting :attr: `~module. __cached__ ` is deprecated. See
181181 :class: `~importlib.machinery.ModuleSpec ` for alternatives.
182182
183183
0 commit comments