]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-113208: Mention namespace packages don't require __init__.py (GH-113209...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 19 Dec 2023 08:46:13 +0000 (09:46 +0100)
committerGitHub <noreply@github.com>
Tue, 19 Dec 2023 08:46:13 +0000 (08:46 +0000)
Co-authored-by: Unique-Usman <86585626+Unique-Usman@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Doc/tutorial/modules.rst

index bf9e8e0b7b806657ffdae7a5b9e47dc5b9a11ebd..0316239e776a95b08d39adbcc89741f43d44b098 100644 (file)
@@ -437,7 +437,8 @@ When importing the package, Python searches through the directories on
 ``sys.path`` looking for the package subdirectory.
 
 The :file:`__init__.py` files are required to make Python treat directories
-containing the file as packages.  This prevents directories with a common name,
+containing the file as packages (unless using a :term:`namespace package`, a
+relatively advanced feature). This prevents directories with a common name,
 such as ``string``, from unintentionally hiding valid modules that occur later
 on the module search path. In the simplest case, :file:`__init__.py` can just be
 an empty file, but it can also execute initialization code for the package or