Make the relationship between 409 and 415 clearer
This commit is contained in:
parent
9c287b6f00
commit
99af5cb027
|
@ -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
|
||||
|
|
11
pep-0415.txt
11
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
|
||||
|
|
Loading…
Reference in New Issue