mirror of https://github.com/python/cpython.git
Doc: update term "namespace package" (#129251)
This commit is contained in:
parent
1775091dc1
commit
e65e9f9062
|
@ -939,11 +939,16 @@ Glossary
|
||||||
modules, respectively.
|
modules, respectively.
|
||||||
|
|
||||||
namespace package
|
namespace package
|
||||||
A :pep:`420` :term:`package` which serves only as a container for
|
A :term:`package` which serves only as a container for subpackages.
|
||||||
subpackages. Namespace packages may have no physical representation,
|
Namespace packages may have no physical representation,
|
||||||
and specifically are not like a :term:`regular package` because they
|
and specifically are not like a :term:`regular package` because they
|
||||||
have no ``__init__.py`` file.
|
have no ``__init__.py`` file.
|
||||||
|
|
||||||
|
Namespace packages allow several individually installable packages to have a common parent package.
|
||||||
|
Otherwise, it is recommended to use a :term:`regular package`.
|
||||||
|
|
||||||
|
For more information, see :pep:`420` and :ref:`reference-namespace-package`.
|
||||||
|
|
||||||
See also :term:`module`.
|
See also :term:`module`.
|
||||||
|
|
||||||
nested scope
|
nested scope
|
||||||
|
|
|
@ -123,6 +123,8 @@ Importing ``parent.one`` will implicitly execute ``parent/__init__.py`` and
|
||||||
``parent/three/__init__.py`` respectively.
|
``parent/three/__init__.py`` respectively.
|
||||||
|
|
||||||
|
|
||||||
|
.. _reference-namespace-package:
|
||||||
|
|
||||||
Namespace packages
|
Namespace packages
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue