title: Get key name from Python KeyError exception
body: <p>I would like to get the key name from the Python <code>KeyError</code> exception:</p>
  
  <p>For example:</p>
  
  <pre><code>myDict = {'key1':'value1'}
  try:
      x1 = myDict['key1']
      x2 = myDict['key2'] 
  except KeyError as e:
      # here i want to use the name of the key that was missing which is 'key2' in this example
      print error_msg[missing_key]
  </code></pre>
  
  <p>i have already tried this </p>
  
  <pre><code>print e
  print e.args
  print e.message
  </code></pre>
  
  <p>my code is inside django view !</p>
  
  <p>if i use ipython for example and try e.arg or e.message it works fine. 
  but then i try it while inside a django view i get this results:</p>
  
  <pre><code>"Key 'key2' not found in &lt;QueryDict: {u'key1': [u'value']}&gt;" 
  ("Key 'key2' not found in &lt;QueryDict: {u'key1': [u'value']}&gt;",) 
  Key 'key2' not found in &lt;QueryDict: {u'key1': [u'value']}&gt;
  </code></pre>
  
  <p>while i just want the 'key2'</p>