Python: variables shared betwen modules and namespaces
<p>After reading at 
<a href="http://stackoverflow.com/questions/15959534/python-visibility-of-global-variables-in-imported-modules">Python - Visibility of global variables in imported modules</a></p>

<p>I was curious about this example:</p>

<pre><code>import shared_stuff
import module1

shared_stuff.a = 3
module1.f()
</code></pre>

<p>If there are no other variables "a" anywhere else, why the following one is not equivalent? </p>

<pre><code>from shared_stuff import *
import module1

a = 3
module1.f()
</code></pre>

<p>We leave out "explicit is better than implicit": I am asking out of curiosity, as I prefer the first syntax anyway. 
I come from C and it looks like I didn't fully grasp Python's namespace's subtleties. 
Even a link to docs where this namespace's behaviour is explained is enough.</p>

<p>Importing <code>*</code> copies all the references from the module into the current scope; there is no connection to the original module at all.</p>

python module global-variables