args attribute of Exception objects

Jeremy Bowers jerf at jerf.org
Fri Apr 8 12:07:30 EDT 2005


On Fri, 08 Apr 2005 09:32:37 +0000, Sébastien de Menten wrote:

> Hi,
> 
> When I need to make sense of a python exception, I often need to parse the 
> string exception in order to retrieve the data.

What exactly are you doing with this info? (Every time I started to do
this, I found a better way. Perhaps one of them will apply for you.)

(As a general comment, I'd point out that you don't have to check the
entire error message; checking for a descriptive substring, while still
not "safe", is at least safe*r*.)



More information about the Python-list mailing list