On 09/19/2016 09:34 PM, Thomas De Schampheleire wrote:


On Sep 19, 2016 9:30 PM, "Mads Kiilerich" <m...@kiilerich.com <mailto:m...@kiilerich.com>> wrote:

>> +from kallithea.tests.base import *
>
>
> Would you have any objections to dropping this and just use kallithea.tests.base where it is needed?
>
> Import * in general is one thing, but having it in a module definition can make it even harder to figure out what is going on.

Does that work with the override of __all__? That is the real reason to import this way. If there is a better way, yes please.


We only need __all__ in a module when we do 'import *' from it. And as I propose it, there would be no 'import *' from __init__.py but from base.py.

(Also __all__ in base.py will unambiguously be everything, and there is thus not need for it. Unless we like explicit.)

/Mads

_______________________________________________
kallithea-general mailing list
kallithea-general@sfconservancy.org
http://lists.sfconservancy.org/mailman/listinfo/kallithea-general

Reply via email to