diff --git a/pep-0409.txt b/pep-0409.txt index 4694a46ac..e6ba1a424 100644 --- a/pep-0409.txt +++ b/pep-0409.txt @@ -8,6 +8,7 @@ Type: Standards Track Content-Type: text/x-rst Created: 26-Jan-2012 Post-History: 30-Aug-2002, 01-Feb-2012, 03-Feb-2012 +Superseded-By: 415 Resolution: http://mail.python.org/pipermail/python-dev/2012-February/116136.html @@ -87,6 +88,10 @@ by the default exception printing routines. Implementation Discussion ========================= +Note: after acceptance of this PEP, a cleaner implementation mechanism +was proposed and accepted in PEP 415. Refer to that PEP for more +details on the implementation actually used in Python 3.3. + Currently, ``None`` is the default for both ``__context__`` and ``__cause__``. In order to support ``raise ... from None`` (which would set ``__cause__`` to ``None``) we need a different default value for ``__cause__``. Several ideas diff --git a/pep-0415.txt b/pep-0415.txt index 36a6ccc2d..25b24943d 100644 --- a/pep-0415.txt +++ b/pep-0415.txt @@ -10,16 +10,19 @@ Content-Type: text/x-rst Created: 26-Feb-2012 Python-Version: 3.3 Post-History: 26-Feb-2012 +Replaces: 409 Resolution: http://mail.python.org/pipermail/python-dev/2012-May/119467.html Abstract ======== -PEP 409 allows PEP 3134 exception contexts and causes to be suppressed when the -exception is printed. This is done using the ``raise exc from None`` -syntax. This PEP proposes to implement context and cause suppression -differently. +PEP 409 introduced support for the ``raise exc from None`` construct to +allow the display of the exception context to be explicitly suppressed. +This PEP retains the language level changes already implemented in PEP 409, +but replaces the underlying implementation mechanism with a simpler approach +based on a new ``__suppress_context__`` attribute on all ``BaseException`` +instances. PEP Acceptance