Ducktyping with exception objects
<p>I want to create a function that can check if the passed arg is an Exception or one of its subclasses. As an example, I would like the the second is_exception function call to return True as well.</p>

<pre><code>def is_exception(obj):
    return type(obj) == Exception

print is_exception(Exception('asdf'))   =&gt; True
print is_exception(EOFError('asdf'))    =&gt; False
</code></pre>

<p>thanks!</p>
