Issue with module changes in python
<p>I am a newbie to python. Below is my module</p>

<p>mymath.py</p>

<pre><code>pi = 3.142

def circle(radius):
    return pi * radius * radius
</code></pre>

<p>In terminal, I run it following way:</p>

<pre><code>&gt;&gt;import mymath
&gt;&gt;mymath.pi
&gt;&gt;3.142
</code></pre>

<p>When I change pi to a local variable and reload(mymath) and do import mymath, still I get value of mymath.pi as 3.142. However the result of mymath.circle(radius) does reflect the change in result.</p>

<pre><code>def circle(radius):
    pi = 3
    return pi * radius * radius

&gt;&gt;import imp
&gt;&gt;imp.reload(mymath)
&gt;&gt;import mymath
&gt;&gt;mymath.pi
&gt;&gt;3.142
&gt;&gt;circle(3)
&gt;&gt;27
</code></pre>

<p>Can anyone tell me what might be the issue?</p>
