This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mrabarnett
Recipients draghuram, ethan.furman, mrabarnett, ncoghlan, pitrou, poke, rhettinger, steven.daprano
Date 2010-12-28.03:31:24
SpamBayes Score 0.000536013
Marked as misclassified No
Message-id <>
Regarding syntax, I'm undecided between:

    raise with new_exception


    raise new_exception with caught_exception

I think that the second form is clearer:

    exception SomeException as ex:
        raise SomeOtherException() with ex

(I'd prefer 'with' to Steven's 'from') but the first form doesn't force you to provide a name:

    exception SomeException:
        raise with SomeOtherException()

and the syntax also means that you can't chain another exception like this:

    exception SomeException as ex:
        raise SomeOtherException() with YetAnotherException()

although perhaps Python should just rely on the programmer's good judgement. :-)
Date User Action Args
2010-12-28 03:31:28mrabarnettsetrecipients: + mrabarnett, rhettinger, ncoghlan, pitrou, draghuram, steven.daprano, poke, ethan.furman
2010-12-28 03:31:28mrabarnettsetmessageid: <>
2010-12-28 03:31:24mrabarnettlinkissue6210 messages
2010-12-28 03:31:24mrabarnettcreate