Skip to content

Commit

Permalink
Doc: update term "namespace package" (pythonGH-129251)
Browse files Browse the repository at this point in the history
(cherry picked from commit e65e9f9)
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
  • Loading branch information
miss-islington authored Feb 15, 2025
1 parent f23ed0c commit de1279a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Doc/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -873,11 +873,16 @@ Glossary
modules, respectively.

namespace package
A :pep:`420` :term:`package` which serves only as a container for
subpackages. Namespace packages may have no physical representation,
A :term:`package` which serves only as a container for subpackages.
Namespace packages may have no physical representation,
and specifically are not like a :term:`regular package` because they
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`.

nested scope
Expand Down
2 changes: 2 additions & 0 deletions Doc/reference/import.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ Importing ``parent.one`` will implicitly execute ``parent/__init__.py`` and
``parent/three/__init__.py`` respectively.


.. _reference-namespace-package:

Namespace packages
------------------

Expand Down

0 comments on commit de1279a

Please sign in to comment.