JuanjoSalvador / NyaaPy

Unofficial Python wrapper for Nyaa anime torrent sites
MIT License
48 stars 23 forks source link

Remove "__init__.py" #21

Closed JuanjoSalvador closed 2 years ago

JuanjoSalvador commented 6 years ago

Python 3 doesn't needs the __init__.py file for modules, so we can delete it and refactor.

Euklios commented 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

JuanjoSalvador commented 2 years ago

I forgot about this issue. Not revelant now.