Skip to content

Commit

Permalink
Merge pull request #1538 from wyattscarpenter/patch-1
Browse files Browse the repository at this point in the history
Update packaging-projects.rst: rephrase first explanation of __init__.py
  • Loading branch information
chrysle authored May 20, 2024
2 parents 7ea90b3 + 9808d5d commit 9d2e58f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions source/tutorials/packaging-projects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 an
:file:`__init__.py` file allows users to import the directory as a regular package,
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
contain the logic (functions, classes, constants, etc.) of your package.
Expand Down

0 comments on commit 9d2e58f

Please sign in to comment.