Skip to content

Commit 4c324b3

Browse files
committed
📝 Update description for init files
1 parent 271e182 commit 4c324b3

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

docs/libs/distribution.rst

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,25 @@ directory.
319319
project name to simplify configuration and be more recognisable to those
320320
installing the package.
321321
:file:`__init__.py`
322-
is required to import the directory as a package. The file should be empty.
322+
is required to import the directory as a package. This allows you to import
323+
the following:
324+
325+
.. code-block:: python
326+
327+
import dataprep.loaders
328+
329+
or
330+
331+
.. code-block:: python
332+
333+
from dataprep import loaders
334+
335+
Although :file:`__init__.py` files are often empty, they can also contain
336+
code.
337+
338+
.. seealso::
339+
* :ref:`python3:tut-packages`
340+
323341
:file:`loaders.py`
324342
is an example of a module within the package that could contain the logic
325343
(functions, classes, constants, :abbr:`etc. (et cetera)`) of your package.

0 commit comments

Comments
 (0)