Skip to content

Doc: update term "namespace package" #129251

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Doc/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -939,11 +939,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
Loading