R. David Murray added the comment:

The str of the exception will always be nonblank (it will contain the string 
'TypeError' at a minimum).  So you need to peel off the 'TypeError:' prefix 
before testing if you want to use str(e).  That's why I suggested using 
args[0], but I suppose that might be a little more fragile.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22379>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to