Terry Reedy wrote:
The PEP does not address the issue of whether the new variation of raise is valid outside of an except block. My memory is that it was not to be and I think it should not be. One advantage of the 'as' form is that it is clear that raising the default as something else is invalid if there is no default.

Were you speaking of the original (PEP 3134), or this new one (PEP 409)?

Because at this point it is possible to do:

    raise ValueError from NameError

outside a try block. I don't see it as incredibly useful, but I don't know that it's worth making it illegal.

So the question is:

  - should 'raise ... from ...' be legal outside a try block?

  - should 'raise ... from None' be legal outside a try block?

~Ethan~
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to