Skip to content

Commit 0eadb42

Browse files
Clarify that __path__ can't be just any value (GH-6554)
(cherry picked from commit 441d945) Co-authored-by: Brett Cannon <brettcannon@users.noreply.github.com>
1 parent 47d57bf commit 0eadb42

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Doc/reference/import.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -617,8 +617,7 @@ the module.
617617
module.__path__
618618
---------------
619619

620-
By definition, if a module has a ``__path__`` attribute, it is a package,
621-
regardless of its value.
620+
By definition, if a module has a ``__path__`` attribute, it is a package.
622621

623622
A package's ``__path__`` attribute is used during imports of its subpackages.
624623
Within the import machinery, it functions much the same as :data:`sys.path`,
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Clarify that the ``__path__`` attribute on modules cannot be just any value.

0 commit comments

Comments
 (0)