summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-12-19 08:46:13 (GMT)
committerGitHub <noreply@github.com>2023-12-19 08:46:13 (GMT)
commitca5a5231d3d36d5b46b6d3f0d3810b3191e85e9b (patch)
treecfd533e472edd3591cd77549ee5069d3bb9e1a94 /Doc/tutorial
parent1c2fcd8b9945afb00cd0dc3f492460923e4c834e (diff)
downloadcpython-ca5a5231d3d36d5b46b6d3f0d3810b3191e85e9b.zip
cpython-ca5a5231d3d36d5b46b6d3f0d3810b3191e85e9b.tar.gz
cpython-ca5a5231d3d36d5b46b6d3f0d3810b3191e85e9b.tar.bz2
[3.12] gh-113208: Mention namespace packages don't require __init__.py (GH-113209) (#113276)
Co-authored-by: Unique-Usman <86585626+Unique-Usman@users.noreply.github.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Diffstat (limited to 'Doc/tutorial')
-rw-r--r--Doc/tutorial/modules.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/tutorial/modules.rst b/Doc/tutorial/modules.rst
index bf9e8e0..0316239 100644
--- a/Doc/tutorial/modules.rst
+++ b/Doc/tutorial/modules.rst
@@ -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