@@ -372,7 +372,7 @@ ABC hierarchy::
372
372
The list of locations where the package's submodules will be found.
373
373
Most of the time this is a single directory.
374
374
The import system passes this attribute to ``__import__() `` and to finders
375
- in the same way as :attr : `sys.path ` but just for the package.
375
+ in the same way as :data : `sys.path ` but just for the package.
376
376
It is not set on non-package modules so it can be used
377
377
as an indicator that the module is a package.
378
378
@@ -609,7 +609,7 @@ ABC hierarchy::
609
609
automatically.
610
610
611
611
When writing to the path fails because the path is read-only
612
- (:attr : `errno.EACCES `/:exc: `PermissionError `), do not propagate the
612
+ (:const : `errno.EACCES `/:exc: `PermissionError `), do not propagate the
613
613
exception.
614
614
615
615
.. versionchanged :: 3.4
@@ -843,7 +843,7 @@ find and load modules.
843
843
844
844
.. classmethod :: path_hook(*loader_details)
845
845
846
- A class method which returns a closure for use on :attr : `sys.path_hooks `.
846
+ A class method which returns a closure for use on :data : `sys.path_hooks `.
847
847
An instance of :class: `FileFinder ` is returned by the closure using the
848
848
path argument given to the closure directly and *loader_details *
849
849
indirectly.
@@ -1184,10 +1184,10 @@ an :term:`importer`.
1184
1184
.. function :: find_spec(name, package=None)
1185
1185
1186
1186
Find the :term: `spec <module spec> ` for a module, optionally relative to
1187
- the specified **package ** name. If the module is in :attr : `sys.modules `,
1187
+ the specified **package ** name. If the module is in :data : `sys.modules `,
1188
1188
then ``sys.modules[name].__spec__ `` is returned (unless the spec would be
1189
1189
``None `` or is not set, in which case :exc: `ValueError ` is raised).
1190
- Otherwise a search using :attr : `sys.meta_path ` is done. ``None `` is
1190
+ Otherwise a search using :data : `sys.meta_path ` is done. ``None `` is
1191
1191
returned if no spec is found.
1192
1192
1193
1193
If **name ** is for a submodule (contains a dot), the parent module is
@@ -1259,7 +1259,7 @@ an :term:`importer`.
1259
1259
:meth: `~importlib.abc.Loader.create_module ` method must return ``None `` or a
1260
1260
type for which its ``__class__ `` attribute can be mutated along with not
1261
1261
using :term: `slots <__slots__> `. Finally, modules which substitute the object
1262
- placed into :attr : `sys.modules ` will not work as there is no way to properly
1262
+ placed into :data : `sys.modules ` will not work as there is no way to properly
1263
1263
replace the module references throughout the interpreter safely;
1264
1264
:exc: `ValueError ` is raised if such a substitution is detected.
1265
1265
@@ -1383,9 +1383,9 @@ For deep customizations of import, you typically want to implement an
1383
1383
:term: `importer `. This means managing both the :term: `finder ` and :term: `loader `
1384
1384
side of things. For finders there are two flavours to choose from depending on
1385
1385
your needs: a :term: `meta path finder ` or a :term: `path entry finder `. The
1386
- former is what you would put on :attr : `sys.meta_path ` while the latter is what
1387
- you create using a :term: `path entry hook ` on :attr : `sys.path_hooks ` which works
1388
- with :attr : `sys.path ` entries to potentially create a finder. This example will
1386
+ former is what you would put on :data : `sys.meta_path ` while the latter is what
1387
+ you create using a :term: `path entry hook ` on :data : `sys.path_hooks ` which works
1388
+ with :data : `sys.path ` entries to potentially create a finder. This example will
1389
1389
show you how to register your own importers so that import will use them (for
1390
1390
creating an importer for yourself, read the documentation for the appropriate
1391
1391
classes defined within this package)::
0 commit comments