What is __init__.py used for in Python?

preview_player
Показать описание
__init__.py is used with packages to provide a naming scheme that includes the directory names.

Namespaces are a new way of allowing multiple teams to create modules with the same names but that live in different locations. You don't need __init__.py for these but should still use when creating normal packages.
Рекомендации по теме