Skip to content

Commit

Permalink
Clarify that __path__ can't be just any value (GH-6554)
Browse files Browse the repository at this point in the history
(cherry picked from commit 441d945)

Co-authored-by: Brett Cannon <brettcannon@users.noreply.github.com>
  • Loading branch information
miss-islington and brettcannon committed Apr 20, 2018
1 parent 47d57bf commit 0eadb42
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions Doc/reference/import.rst
Expand Up @@ -617,8 +617,7 @@ the module.
module.__path__
---------------

By definition, if a module has a ``__path__`` attribute, it is a package,
regardless of its value.
By definition, if a module has a ``__path__`` attribute, it is a package.

A package's ``__path__`` attribute is used during imports of its subpackages.
Within the import machinery, it functions much the same as :data:`sys.path`,
Expand Down
@@ -0,0 +1 @@
Clarify that the ``__path__`` attribute on modules cannot be just any value.

0 comments on commit 0eadb42

Please sign in to comment.