[Python-checkins] Clarify that __path__ can't be just any value (GH-6554)

Miss Islington (bot) webhook-mailer at python.org
Fri Apr 20 19:50:02 EDT 2018


https://github.com/python/cpython/commit/0eadb42596e5e542822a89e66fa2828c6013851f
commit: 0eadb42596e5e542822a89e66fa2828c6013851f
branch: 3.6
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2018-04-20T16:49:58-07:00
summary:

Clarify that __path__ can't be just any value (GH-6554)

(cherry picked from commit 441d945eb33f8dc130b268ebfa11315b98a2433c)

Co-authored-by: Brett Cannon <brettcannon at users.noreply.github.com>

files:
A Misc/NEWS.d/next/Documentation/2018-04-20-14-09-36.bpo-33276.rA1z_3.rst
M Doc/reference/import.rst

diff --git a/Doc/reference/import.rst b/Doc/reference/import.rst
index 7fbf8ed9d789..61f58539fe82 100644
--- a/Doc/reference/import.rst
+++ b/Doc/reference/import.rst
@@ -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`,
diff --git a/Misc/NEWS.d/next/Documentation/2018-04-20-14-09-36.bpo-33276.rA1z_3.rst b/Misc/NEWS.d/next/Documentation/2018-04-20-14-09-36.bpo-33276.rA1z_3.rst
new file mode 100644
index 000000000000..0da58a0ce4c8
--- /dev/null
+++ b/Misc/NEWS.d/next/Documentation/2018-04-20-14-09-36.bpo-33276.rA1z_3.rst
@@ -0,0 +1 @@
+Clarify that the ``__path__`` attribute on modules cannot be just any value.



More information about the Python-checkins mailing list