What is __init__.py for in a Python source directory?
What is __init__.py for in a Python source directory?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It used to be a required part of a package (old, pre-3.3 ‘regular package’, not newer 3.3+ ‘namespace package’).
Here’s the documentation.
But just click the link, it contains an example, more information, and an explanation of namespace packages, the kind of packages without
__init__.py.