Python variable scope in if-statements
<p>In Python, are variable scopes inside if-statements visible outside of the if-statement? (coming from a Java background, so find this a bit odd)</p>

<p>In the following case, name is first defined inside the if-block but the variable is visible outside of the if-block as well. I was expecting an error to occur but 'joe' gets printed.</p>

<pre><code>if 1==1:
    name = 'joe'
print(name)
</code></pre>
