Python Mystery Theatre -- Episode 1: Exceptions

Erik Max Francis max at alcyone.com
Sat Jul 12 13:12:24 CEST 2003


Peter Hansen wrote:

> This is probably an example of an error promoted by leaving the
> redundant "raise Class,args" form of exception-raising in Python,
> instead of having a single obvious way: "raise Class(args)" as
> would be more Pythonic. ;-)

But, as I recall, PEP 317 was outright rejected, so it looks like this
will be with us for a long time.

I personally have never had a problem with the distinction, raise C, x
always seemed fairly clean to me even though really what you mean is
raise C(x).

-- 
   Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
 __ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
/  \ I want a martini that could be declared a disaster area.
\__/  Capt. Benjamin "Hawkeye" Pierce




More information about the Python-list mailing list