[Python-Dev] PEP 409 update [was: PEP 409 (original) (raw)
Ethan Furman ethan at stoneleaf.us
Fri Feb 3 03:42:52 CET 2012
- Previous message: [Python-Dev] PEP 409 update [was: PEP 409 - final?]
- Next message: [Python-Dev] PEP 409 - Accepted!
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Nick Coghlan wrote:
FWIW, I expect the implementation will allow "raise exc from Ellipsis" as an odd synonym for "raise exc".
Are we sure we want that? Raising from something not an exception seems counter-intuitive (None being the obvious exception).
I'd want to allow "exc.cause = Ellipsis" to reset an exception with a previously set cause back to the default state,
Already done. :)
at which point the synonym follows from the semantics of "raise X from Y" as syntactic sugar for "exc = X; exc.cause = Y; raise exc"
I can see where it would make some sense that way, but it still seems odd.
Ethan
- Previous message: [Python-Dev] PEP 409 update [was: PEP 409 - final?]
- Next message: [Python-Dev] PEP 409 - Accepted!
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]