A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2015-March/138928.html below:

[Python-Dev] peps: New PEP 490: Chain exceptions at C level

[Python-Dev] peps: New PEP 490: Chain exceptions at C level [Python-Dev] peps: New PEP 490: Chain exceptions at C levelAndrew Svetlov andrew.svetlov at gmail.com
Thu Mar 26 13:45:54 CET 2015
I think setting context in exception constructor would be fine.

On Thu, Mar 26, 2015 at 1:36 PM, Victor Stinner
<victor.stinner at gmail.com> wrote:
> 2015-03-26 11:52 GMT+01:00 Andrew Svetlov <andrew.svetlov at gmail.com>:
>> There is another issue: exception chain is not set up on exception
>> creation in python code, only on throwing.
>
> I'm not suprised of that.
>
>> Thus I have to assign `__context__` and `__cause__` attributes
>> manually if I want to call `future.set_exception(exc)` instead of
>> `raise exc`.
>
> Do you mean that we need an helper to make this task even simpler? Or
> do you suggest to set them automatically in the constructor?
>
> Victor



-- 
Thanks,
Andrew Svetlov
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4