Preferred exception style?

Steven Taschuk staschuk at telusplanet.net
Sat May 31 10:47:23 EDT 2003


Quoth I:
  [...]
> Positional parameters (but not keyword arguments) can be passed
> with the comma syntax, using a tuple in the second place:
> 
>     raise GetRunFailed, (reqobj, dberrormsg, domainerr)
> 
> The familiar special case for 1-tuples occurs here too, of course.

Actually, it doesn't; I was confused.  Any tuple in the second
place will be treated as a list of arguments for the exception
instantiation, no matter the tuple's length.  Same as string
interpolation.

-- 
Steven Taschuk                            staschuk at telusplanet.net
Every public frenzy produces legislation purporting to address it.
                                                  (Kinsley's Law)





More information about the Python-list mailing list