@@ -46,10 +46,10 @@ support.
46
46
47
47
.. class :: ImpImporter(dirname=None)
48
48
49
- :pep: `302 ` Importer that wraps Python's "classic" import algorithm.
49
+ :pep: `302 ` Finder that wraps Python's "classic" import algorithm.
50
50
51
- If *dirname * is a string, a :pep: `302 ` importer is created that searches that
52
- directory. If *dirname * is ``None ``, a :pep: `302 ` importer is created that
51
+ If *dirname * is a string, a :pep: `302 ` finder is created that searches that
52
+ directory. If *dirname * is ``None ``, a :pep: `302 ` finder is created that
53
53
searches the current :data: `sys.path `, plus any modules that are frozen or
54
54
built-in.
55
55
@@ -63,7 +63,7 @@ support.
63
63
64
64
.. class :: ImpLoader(fullname, file, filename, etc)
65
65
66
- :pep: ` 302 ` Loader that wraps Python's "classic" import algorithm.
66
+ :term: ` Loader ` that wraps Python's "classic" import algorithm.
67
67
68
68
.. deprecated :: 3.3
69
69
This emulation is no longer needed, as the standard import mechanism
@@ -72,7 +72,7 @@ support.
72
72
73
73
.. function :: find_loader(fullname)
74
74
75
- Retrieve a :pep: ` 302 ` module loader for the given *fullname *.
75
+ Retrieve a module :term: ` loader ` for the given *fullname *.
76
76
77
77
This is a backwards compatibility wrapper around
78
78
:func: `importlib.util.find_spec ` that converts most failures to
@@ -88,9 +88,9 @@ support.
88
88
89
89
.. function :: get_importer(path_item)
90
90
91
- Retrieve a :pep: ` 302 ` importer for the given *path_item *.
91
+ Retrieve a :term: ` finder ` for the given *path_item *.
92
92
93
- The returned importer is cached in :data: `sys.path_importer_cache ` if it was
93
+ The returned finder is cached in :data: `sys.path_importer_cache ` if it was
94
94
newly created by a path hook.
95
95
96
96
The cache (or part of it) can be cleared manually if a rescan of
@@ -103,7 +103,7 @@ support.
103
103
104
104
.. function :: get_loader(module_or_name)
105
105
106
- Get a :pep: ` 302 ` " loader" object for *module_or_name *.
106
+ Get a :term: ` loader ` object for *module_or_name *.
107
107
108
108
If the module or package is accessible via the normal import mechanism, a
109
109
wrapper around the relevant part of that machinery is returned. Returns
@@ -121,16 +121,16 @@ support.
121
121
122
122
.. function :: iter_importers(fullname='')
123
123
124
- Yield :pep: ` 302 ` importers for the given module name.
124
+ Yield :term: ` finder ` objects for the given module name.
125
125
126
- If fullname contains a '.', the importers will be for the package
126
+ If fullname contains a '.', the finders will be for the package
127
127
containing fullname, otherwise they will be all registered top level
128
- importers (i.e. those on both sys.meta_path and sys.path_hooks).
128
+ finders (i.e. those on both sys.meta_path and sys.path_hooks).
129
129
130
130
If the named module is in a package, that package is imported as a side
131
131
effect of invoking this function.
132
132
133
- If no module name is specified, all top level importers are produced.
133
+ If no module name is specified, all top level finders are produced.
134
134
135
135
.. versionchanged :: 3.3
136
136
Updated to be based directly on :mod: `importlib ` rather than relying
@@ -201,7 +201,7 @@ support.
201
201
202
202
Get a resource from a package.
203
203
204
- This is a wrapper for the :pep: ` 302 ` loader :func: `get_data ` API. The
204
+ This is a wrapper for the :term: ` loader ` :func: `get_data ` API. The
205
205
*package * argument should be the name of a package, in standard module format
206
206
(``foo.bar ``). The *resource * argument should be in the form of a relative
207
207
filename, using ``/ `` as the path separator. The parent directory name
@@ -216,5 +216,5 @@ support.
216
216
d = os.path.dirname(sys.modules[package].__file__)
217
217
data = open(os.path.join(d, resource), 'rb').read()
218
218
219
- If the package cannot be located or loaded, or it uses a :pep: ` 302 ` loader
219
+ If the package cannot be located or loaded, or it uses a :term: ` loader `
220
220
which does not support :func: `get_data `, then ``None `` is returned.
0 commit comments