From d8f425f264409951ac037b2e0500624249c6f71c Mon Sep 17 00:00:00 2001 From: wyattscarpenter Date: Fri, 3 May 2024 00:02:42 -0400 Subject: [PATCH 1/2] Update packaging-projects.rst: rephrase first explanation of __init.py__ --- source/tutorials/packaging-projects.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/tutorials/packaging-projects.rst b/source/tutorials/packaging-projects.rst index 761b2748f..095abd19f 100644 --- a/source/tutorials/packaging-projects.rst +++ b/source/tutorials/packaging-projects.rst @@ -54,8 +54,10 @@ Create the following file structure locally: The directory containing the Python files should match the project name. This simplifies the configuration and is more obvious to users who install the package. -:file:`__init__.py` is recommended to import the directory as a regular package, -even if as is our case for this tutorial that file is empty [#namespace-packages]_. +Creating the file :file:`__init__.py` is recommended because the existence of a +:file:`__init__.py` file allows users to import the directory as a regular package, +even if (as is the case for this tutorial) :file:`__init__.py` is empty. +[#namespace-packages]_ :file:`example.py` is an example of a module within the package that could contain the logic (functions, classes, constants, etc.) of your package. From 9808d5d06c77d0a25b0c86433212116d34d8ae8f Mon Sep 17 00:00:00 2001 From: wyattscarpenter Date: Fri, 3 May 2024 00:06:26 -0400 Subject: [PATCH 2/2] Update packaging-projects.rst: you know, I reckon people say "a*n* __init__.py file" --- source/tutorials/packaging-projects.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/tutorials/packaging-projects.rst b/source/tutorials/packaging-projects.rst index 095abd19f..4c205e28f 100644 --- a/source/tutorials/packaging-projects.rst +++ b/source/tutorials/packaging-projects.rst @@ -54,9 +54,9 @@ Create the following file structure locally: The directory containing the Python files should match the project name. This simplifies the configuration and is more obvious to users who install the package. -Creating the file :file:`__init__.py` is recommended because the existence of a +Creating the file :file:`__init__.py` is recommended because the existence of an :file:`__init__.py` file allows users to import the directory as a regular package, -even if (as is the case for this tutorial) :file:`__init__.py` is empty. +even if (as is the case in this tutorial) :file:`__init__.py` is empty. [#namespace-packages]_ :file:`example.py` is an example of a module within the package that could