title: Python: issue when using vars() dictionary
body: <p>I have the following snippet:</p>
  
  <pre><code>a, b = 1, 2
  params = ['a', 'b']
  res = {p: vars()[p] for p in params}
  </code></pre>
  
  <p>Which gives me <code>KeyError: 'a'</code> whereas the following code works fine:</p>
  
  <pre><code>a, b = 1, 2
  params = ['a', 'b']
  res = {}
  for p in params:
      res[p] = vars()[p] 
  </code></pre>
  
  <p>What's the difference here?</p>