[Python-Dev] PEP 409 update [was: PEP 409 (original) (raw)
Tim Delaney timothy.c.delaney at gmail.com
Fri Feb 3 06:16:07 CET 2012
- Previous message: [Python-Dev] PEP 409 update [was: PEP 409 - final?]
- Next message: [Python-Dev] distutils 'depends' management
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 3 February 2012 15:02, Nick Coghlan <ncoghlan at gmail.com> wrote:
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
I'd totally forgotten that was the case in 3.x ... it's still not exactly common to use Ellipsis/... directly except in extended slicing.
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.
Absolutely - I can't think of a reason to want to reraise an existing exception while supressing any existing cause in favour of context. But I'm sure someone can.
Tim Delaney -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20120203/b710299d/attachment.html>
- Previous message: [Python-Dev] PEP 409 update [was: PEP 409 - final?]
- Next message: [Python-Dev] distutils 'depends' management
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]