mirror of
https://github.com/python/cpython.git
synced 2025-10-29 01:22:59 +00:00
Clarify that __path__ can't be just any value (GH-6554)
This commit is contained in:
parent
a8c342465b
commit
441d945eb3
2 changed files with 2 additions and 2 deletions
|
|
@ -616,8 +616,7 @@ the module.
|
||||||
module.__path__
|
module.__path__
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
By definition, if a module has a ``__path__`` attribute, it is a package,
|
By definition, if a module has a ``__path__`` attribute, it is a package.
|
||||||
regardless of its value.
|
|
||||||
|
|
||||||
A package's ``__path__`` attribute is used during imports of its subpackages.
|
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`,
|
Within the import machinery, it functions much the same as :data:`sys.path`,
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
Clarify that the ``__path__`` attribute on modules cannot be just any value.
|
||||||
Loading…
Add table
Add a link
Reference in a new issue