I have read that there is no longer a need to add the __init__.py
file in latest versions of python to treat a folder as package. However, the python official documentation does not say this - for example the below still shows examples and documentation using the __init__.py
file.
The
__init__.py
files are required to make Python treat directories containing the file as packages.
https://docs.python.org/3/tutorial/modules.html#packages
Do we still need to use the __init__.py
file to make python treat a folder as package? And are there any advantages/disadvantages to adding/removing this file?