title: How to use an Exception's attributes in Python?
body: <p>Is there a way to use the attributes/properties of an <code>Exception</code> object in a try-except block in Python?</p>
  
  <p>For example in Java we have:</p>
  
  <pre class="lang-java prettyprint-override"><code>try {
      // Some code
  } catch(Exception e) {
      // Here we can use some of the attributes of "e"
  }
  </code></pre>
  
  <p>What equivalent in Python would give me a reference to <code>e</code>?</p>