[New-bugs-announce] [issue14805] Support display of both __cause__ and __context__

Nick Coghlan report at bugs.python.org
Mon May 14 14:00:39 CEST 2012


New submission from Nick Coghlan <ncoghlan at gmail.com>:

With PEP 415 accepted as the implementation of the "raise exc from None" syntax, it raises the prospect of exceptions with both __cause__ and __context__ set to non-None values, and __suppress_context__ set to False.

The initial PEP 415 patch treats this case the same way PEP 409 did: it ignores __context__ if *either* __cause__ is not None *or* __suppress_context__ is True.

This issue proposes that at least the default exception display routine and the display routine in the traceback module be updated to display the __context__ any time __suppress_context__ is False, even if __cause__ is also non-None.

----------
components: Interpreter Core, Library (Lib)
messages: 160609
nosy: ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: Support display of both __cause__ and __context__
type: enhancement
versions: Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14805>
_______________________________________


More information about the New-bugs-announce mailing list