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/2012-February/116952.html below:

[Python-Dev] PEP 415: Implementing PEP 409 differently

[Python-Dev] PEP 415: Implementing PEP 409 differently [Python-Dev] PEP 415: Implementing PEP 409 differentlyEthan Furman ethan at stoneleaf.us
Mon Feb 27 19:22:05 CET 2012
Benjamin Peterson wrote:
> 2012/2/26 Nick Coghlan <ncoghlan at gmail.com>:
>> Thanks for writing that up. I'd be amenable if the PEP was clearly
>> updated to say that ``raise exc from cause`` would change from being
>> syntactic sugar for ``_hidden = exc; _hidden.__cause__ = cause; raise
>> exc`` (as it is now) to ``_hidden = exc; _hidden.__cause__ = cause;
>> _hidden.__suppress_context__ = True; raise exc``. The patch should
>> then be implemented accordingly (including appropriate updates to the
>> language reference).
> 
> I add the following lines to the PEP:
> 
> To summarize, ``raise exc from cause`` will be equivalent to::
> 
>     exc.__cause__ = cause
>     exc.__suppress_context__ = cause is None
>     raise exc

So exc.__cause__ will be None both before and after `raise Exception 
from None`?

~Ethan~
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