[Python-Dev] PEP 409 update [was: PEP 409 (original) (raw)
Nick Coghlan ncoghlan at gmail.com
Fri Feb 3 05:02:36 CET 2012
- Previous message: [Python-Dev] PEP 409 update [was: PEP 409 - final?]
- Next message: [Python-Dev] PEP 409 update [was: PEP 409 - final?]
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, Feb 3, 2012 at 1:34 PM, Tim Delaney <timothy.c.delaney at gmail.com> wrote:
? I kinda like the second - it feels more self-descriptive to me than "from Ellipsis" - but there's the counter-argument that it could look like noise, and I think would require a grammar change to allow it there.
Both will be allowed - in 3.x, '...' is just an ordinary expression that means exactly the same thing as the builtin Ellipsis:
Ellipsis Ellipsis ... Ellipsis
Sane code almost certainly won't include either form, though. If you're reraising an exception, you should generally be leaving cause and context alone, and if you're raising a new exception, then cause will already be Ellipsis by default - you only need to use "raise X from Y" to set it to something else.
As I noted earlier, supporting Ellipsis in the "raise X from Y" syntax shouldn't require a code change in Ethan's implementation, just a few additional tests to ensure it works as expected.
Cheers, Nick.
-- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
- Previous message: [Python-Dev] PEP 409 update [was: PEP 409 - final?]
- Next message: [Python-Dev] PEP 409 update [was: PEP 409 - final?]
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]