File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -987,11 +987,14 @@ find and load modules.
987987
988988.. class :: NamespacePath(name, path, path_finder)
989989
990- Represents a namespace package's path. It uses the module *name * to find its
991- parent module, and from there it looks up the parent's
992- :attr: `module.__path__ `. When this changes, the module's own path is
993- recomputed, using *path_finder *. For top-level modules, the parent module's
994- path is :data: `sys.path `.
990+ Represents a namespace package's path.
991+
992+ It uses the module *name * to find its parent module, and from there it looks
993+ up the parent's :attr: `module.__path__ `. When this changes, the module's own
994+ path is recomputed, using *path_finder *. The initial package path value is
995+ set to *path *.
996+
997+ For top-level modules, the parent module's path is :data: `sys.path `.
995998
996999
9971000.. class :: SourceFileLoader(fullname, path)
Original file line number Diff line number Diff line change @@ -1080,11 +1080,14 @@ def get_filename(self, fullname):
10801080
10811081
10821082class NamespacePath :
1083- """Represents a namespace package's path. It uses the module name
1084- to find its parent module, and from there it looks up the parent's
1085- __path__. When this changes, the module's own path is recomputed,
1086- using path_finder. For top-level modules, the parent module's path
1087- is sys.path."""
1083+ """Represents a namespace package's path.
1084+
1085+ It uses the module name to find its parent module, and from there it looks
1086+ up the parent's __path__. When this changes, the module's own path is
1087+ recomputed, using path_finder. The initial package path value is set to path.
1088+
1089+ For top-level modules, the parent module's path is sys.path.
1090+ """
10881091
10891092 # When invalidate_caches() is called, this epoch is incremented
10901093 # https://bugs.python.org/issue45703
You can’t perform that action at this time.
0 commit comments