Which exception to use?

Chad Netzer cnetzer at mail.arc.nasa.gov
Tue Jan 28 23:19:31 CET 2003


On Tuesday 28 January 2003 13:08, Peter Hansen wrote:
> Chad Netzer wrote:

> I'm pretty sure that even your approach is raising an instance, as
> the docs say "For class exceptions, this object must be an instance
> of the exception class being raised.".

I agree.  When raising a class, an instance is eventually created (by 
the interpreter).  I just meant that the user doesn't create it 
directly.  I haven't discerned which is more advantageous.  I guess it 
is (largely) a matter of personal style.

-- 
Bay Area Python Interest Group - http://www.baypiggies.net/

Chad Netzer
(any opinion expressed is my own and not NASA's or my employer's)





More information about the Python-list mailing list