> __all__ = (Class.__name__, func.__name__, ...)
>
> So I have to put it at the end of the module. I do this because if I
> change the class or function name and I forget to change it in
> __all__, I get an exception.
I certainly will not claim to be the arbitrator of good and bad practices but that seems reasonable enough.
It is worth pointing out that it's pretty easy to unit test `__all__`
```
# module/__init__.py
__all__ = 'Foo', 'Bar'
class Foo: pass
```
```
# tests/test_imports.py
def test_star():
# will raise `AttributeError: module 'module' has not attribute 'Bar'`
from module import *
```
> from .a import *
> from .b import *
> __all__ = a.__all__ + b.__all__
Assuming you mean:
```
from . import a
from . import b
from .a import *
from .b import *
__all__ = a.__all__ + b.__all__
```
It is fairly unnecessary if you aren't adding more names. but definitely isn't harmful.