Closed JuanjoSalvador closed 2 years ago
While python3 doesn't require the __init__.py
file, it is still recommended. Directories without this file are treated as namespace packages. They are helpful for scenarios where multiple packages contribute to the same namespace (for example, a company providing various packages within a confined company namespace). This wouldn't have worked before python3, as in a scenario with company.packageA
and company.packageB
, the __init__.py
files in both com packages would be ambiguous (see SO answer for a better example).
Relevant SO answer: https://stackoverflow.com/a/48804718
I forgot about this issue. Not revelant now.
Python 3 doesn't needs the
__init__.py
file for modules, so we can delete it and refactor.