title: How to use str to convert an exception object to string using str in Python?
body: <p>I have seen code which 'converts' exception objects to the error string using str() like this:</p>
  
  <pre><code>try:
    ...
  except Exception, err:
    print str(err)
  </code></pre>
  
  <p>Does err contain some public 'interface' through which its error string is fetched?
  I want to have the same functionality for my custom exception class. One way i can think of doing is just define a global str() method for all my exception objects and then inside just return the error string using getter. Is that how I should do it?</p>