
M.-A. Lemburg wrote:
The public API of a library is the one which is documented as such. That's really all there is to it. Documentation is written explicitly by the author of a package and languages provides a lot more nuances than using some programmatic mechanism. I use __all__ with sphinx to automatically build my documentation, so __all__ effectively becomes part of the documentation. I don't expect people to use import *. Maybe for big projects there is a need to write all the documentation by hand, but for small libraries using __all__ and automatically build the documentation (along other pages like FAQ, HOWTO and so on) is very powerful and makes a good documentation while assurint it's up to date with the code. There are definitely use cases for __all__ outside of import *.