return values for exceptions

N. Thomas nthomas at cise.ufl.edu
Mon Nov 11 18:44:29 EST 2002


I notice that user defined Python exceptions always return a value of 1 to
the shell. I'd like to return different values in my program, depending on
the exception, is there any way to do this?

I suppose that I could trap the exception, and then return a value based on
that, but I'm not too sure if that is the right way to go about doing it.

thanks,
thomas



More information about the Python-list mailing list