]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Doc: update term "namespace package" (#129251)
authorInada Naoki <songofacandy@gmail.com>
Fri, 14 Feb 2025 18:47:54 +0000 (03:47 +0900)
committerGitHub <noreply@github.com>
Fri, 14 Feb 2025 18:47:54 +0000 (13:47 -0500)
Doc/glossary.rst
Doc/reference/import.rst

index d933ca6b467cf3bd5066f491982c0b9c591ee7b9..7670bd859e282ebab7909718da9f712543095c8c 100644 (file)
@@ -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
index 48fdd0f5d021c74f285354629ae138801de48a96..d772d1f5345fcdd6c97099504927fc4844bab007 100644 (file)
@@ -123,6 +123,8 @@ Importing ``parent.one`` will implicitly execute ``parent/__init__.py`` and
 ``parent/three/__init__.py`` respectively.
 
 
+.. _reference-namespace-package:
+
 Namespace packages
 ------------------