Hierarchical python imports
<p>So I have two modules A and B, and another installed module C. Say I use some methods of C in A and B. I also need module A in B. So logically my imports would be : </p>

<p>A :</p>

<pre><code>import C
</code></pre>

<p>B :</p>

<pre><code>import A
</code></pre>

<p>Logic would tell me that B would contain functions from A and C. However this doesnt work this way by default. In the sense that to refer to any functions in C in module A, we need the extra level of namespace reference </p>

<pre><code>A.C.some_c_module()
</code></pre>

<p>I found out that we can import C in both A and B without the use of pesky "C language like" ifdef clones,and it would work fine. My question is, does importing such modules twice come with a penalty? In the sense that is python smart enough to know that A.C.some_module == C.some_module? Or am I just being a bad boy by doing this?</p>
