title: Is the namespace created when free variables are used?
body: <pre><code>x = 2
  def my_func():
      print(x)
      print(dir())
  
  my_func()
  </code></pre>
  
  <p>The output by the statement <code>print(dir())</code> is an empty list <code>[]</code>. Was the local namespace created but didn't contain any name or it wasn't created at all?</p>