Is it a good practice for a module to recursively import its submodules?
<p>I see a common pattern with Python modules. Sometimes <code>__init__.py</code> imports its submodules:</p>

<p>E.g.</p>

<pre><code>mymod/
    __init__.py:
        from . import subm1, subm2
        __all__ = ['subm1', 'subm2']

    subm1.py:
        def subf1():
            ...
        __all__ = ['subf1']

    subm2.py:
        def subf2():
            ...
        __all__ = ['subf2']
</code></pre>

<p>So the client code only has to do this:</p>

<pre><code>import mymod
mymod.subm1.subf1()
mymod.subm2.subf2()
</code></pre>

<p>Instead of:</p>

<pre><code>import mymod.subm1
import mymod.subm2
mymod.subm1.subf1()
mymod.subm2.subf2()
</code></pre>

<p>Which one is The Best Practice<sup>TM</sup>? Is there anything wrong with the recursive import or should I stick to the default behaviour? What's the rationale for the default behaviour?</p>
