From: Inada Naoki Date: Fri, 14 Feb 2025 18:47:54 +0000 (+0900) Subject: Doc: update term "namespace package" (#129251) X-Git-Tag: v3.14.0a6~417 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e65e9f90626a4c62da4d3500044f354b51e51dbb;p=thirdparty%2FPython%2Fcpython.git Doc: update term "namespace package" (#129251) --- diff --git a/Doc/glossary.rst b/Doc/glossary.rst index d933ca6b467c..7670bd859e28 100644 --- a/Doc/glossary.rst +++ b/Doc/glossary.rst @@ -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 diff --git a/Doc/reference/import.rst b/Doc/reference/import.rst index 48fdd0f5d021..d772d1f5345f 100644 --- a/Doc/reference/import.rst +++ b/Doc/reference/import.rst @@ -123,6 +123,8 @@ Importing ``parent.one`` will implicitly execute ``parent/__init__.py`` and ``parent/three/__init__.py`` respectively. +.. _reference-namespace-package: + Namespace packages ------------------