]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Doc: update term "namespace package" (GH-129251)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 15 Feb 2025 06:11:38 +0000 (07:11 +0100)
committerGitHub <noreply@github.com>
Sat, 15 Feb 2025 06:11:38 +0000 (15:11 +0900)
(cherry picked from commit e65e9f90626a4c62da4d3500044f354b51e51dbb)
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
Doc/glossary.rst
Doc/reference/import.rst

index be8201ef41941f11be6c53c1b3979cda370354c0..f57f00b0ae133cdc2cafb3ef04ebed570285f47a 100644 (file)
@@ -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
index ac363e8cfa00dc40956cbe92bd8fd6098a80b4c4..26a8b2d9c7187e87cc227387dbc611ea54c29a66 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
 ------------------