@@ -36,7 +36,7 @@ implement import semantics.
3636
3737When a module is first imported, Python searches for the module and if found,
3838it creates a module object [#fnmo ]_, initializing it. If the named module
39- cannot be found, an :exc: `ModuleNotFoundError ` is raised. Python implements various
39+ cannot be found, a :exc: `ModuleNotFoundError ` is raised. Python implements various
4040strategies to search for the named module when the import machinery is
4141invoked. These strategies can be modified and extended by using various hooks
4242described in the sections below.
@@ -167,7 +167,7 @@ arguments to the :keyword:`import` statement, or from the parameters to the
167167This name will be used in various phases of the import search, and it may be
168168the dotted path to a submodule, e.g. ``foo.bar.baz ``. In this case, Python
169169first tries to import ``foo ``, then ``foo.bar ``, and finally ``foo.bar.baz ``.
170- If any of the intermediate imports fail, an :exc: `ModuleNotFoundError ` is raised.
170+ If any of the intermediate imports fail, a :exc: `ModuleNotFoundError ` is raised.
171171
172172
173173The module cache
@@ -185,7 +185,7 @@ object.
185185
186186During import, the module name is looked up in :data: `sys.modules ` and if
187187present, the associated value is the module satisfying the import, and the
188- process completes. However, if the value is ``None ``, then an
188+ process completes. However, if the value is ``None ``, then a
189189:exc: `ModuleNotFoundError ` is raised. If the module name is missing, Python will
190190continue searching for the module.
191191
@@ -194,7 +194,7 @@ associated module (as other modules may hold references to it),
194194but it will invalidate the cache entry for the named module, causing
195195Python to search anew for the named module upon its next
196196import. The key can also be assigned to ``None ``, forcing the next import
197- of the module to result in an :exc: `ModuleNotFoundError `.
197+ of the module to result in a :exc: `ModuleNotFoundError `.
198198
199199Beware though, as if you keep a reference to the module object,
200200invalidate its cache entry in :data: `sys.modules `, and then re-import the
@@ -298,7 +298,7 @@ The second argument is the path entries to use for the module search. For
298298top-level modules, the second argument is ``None ``, but for submodules or
299299subpackages, the second argument is the value of the parent package's
300300``__path__ `` attribute. If the appropriate ``__path__ `` attribute cannot
301- be accessed, an :exc: `ModuleNotFoundError ` is raised. The third argument
301+ be accessed, a :exc: `ModuleNotFoundError ` is raised. The third argument
302302is an existing module object that will be the target of loading later.
303303The import system passes in a target module only during reload.
304304
@@ -616,7 +616,7 @@ the module.
616616module.__path__
617617---------------
618618
619- By definition, if a module has an ``__path__ `` attribute, it is a package,
619+ By definition, if a module has a ``__path__ `` attribute, it is a package,
620620regardless of its value.
621621
622622A package's ``__path__ `` attribute is used during imports of its subpackages.
0 commit comments