I use __init__.pyto run checks when I do from myprojects.something import blabla.
Today I started using pyzmq, and I wanted to see what happens behind the scenes. So I looked at the code on github and found (for me) some weird use __init__.pythere that I cannot explain myself.
For example zmq/core/__init__.py. What is the point of adding to the zmq.core.__all__values __all__ zmq.core.constants, zmq.core.error, zmq.core.message, etc.?
As zmq/__init__.pyI see the end
__all__ = ['get_includes'] + core.__all__
where get_includesis a function that basically returns a list with the module directory and the utils directory in the parent directory.
What's the point? What __init.py__did you accomplish by doing this?
Pablo source
share