Sub packages and __init__.py
问题 So, this is a set of questions about how to use __init__.py in packages/sub-packages. I have searched, and surprisingly not found a decent answer to this. If I have the following structure (which is just a simplified example obviously): my_package/ __init__.py module1.py my_sub_package/ __init__.py module2.py the contents of module1.py is my_string = 'Hello' the contents of module2.py is my_int = 42 First question: importing multiple modules from a package by default What should be in the _