title: Python globals and keyword arguments
body: <p>Why does <code>test2()</code> below print &quot;True False&quot;? I would expect &quot;False False&quot;.</p>
  <p>I expect <code>test2()</code> to change the global value <code>EC</code> to be False, so <code>ec</code> should also be False.</p>
  <p>Why not?</p>
  <p>Is there a straightforward way to get the &quot;False False&quot; behavior?</p>
  <pre><code>EC = True
  
  def test1(ec=EC):
      print(ec, EC)
  
  def test2():
  
      global EC
      EC=False
  
      test1()
  </code></pre>