En Thu, 08 Mar 2007 21:11:54 -0300, Steven D'Aprano  
<[EMAIL PROTECTED]> escribió:

>>> @onfail(False)
>>> def a(x):
>>>     if x == 1:
>>>         return 'function a succeeded'
>>>     else:
>>>         raise
>
> I thought "raise" on its own was supposed to re-raise the previous
> exception, but I've just tried it in the interactive interpreter and it
> doesn't work for me.

Not the *previous* exception, but the *current* one. You must be inside an  
"except" clause to use a bare raise.

-- 
Gabriel Genellina

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to