diff options
author | Benjamin Peterson <benjamin@python.org> | 2012-05-15 05:09:31 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2012-05-15 05:09:31 (GMT) |
commit | d5a1c44455d969968f453f029727bfc45e4ce0a9 (patch) | |
tree | 98e91aa8130d600df0b1fdf329bbdc9d60d4b14c /Doc/c-api | |
parent | d91dc623791fd9973b914a57540d89cb986da7c9 (diff) | |
download | cpython-d5a1c44455d969968f453f029727bfc45e4ce0a9.zip cpython-d5a1c44455d969968f453f029727bfc45e4ce0a9.tar.gz cpython-d5a1c44455d969968f453f029727bfc45e4ce0a9.tar.bz2 |
PEP 415: Implement suppression of __context__ display with an exception attribute
This replaces the original PEP 409 implementation. See #14133.
Diffstat (limited to 'Doc/c-api')
-rw-r--r-- | Doc/c-api/exceptions.rst | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/Doc/c-api/exceptions.rst b/Doc/c-api/exceptions.rst index f181143..9a66b7f 100644 --- a/Doc/c-api/exceptions.rst +++ b/Doc/c-api/exceptions.rst @@ -471,10 +471,6 @@ Exception Objects set by ``raise ... from ...``) associated with the exception as a new reference, as accessible from Python through :attr:`__cause__`. - If there is no cause associated, this returns *NULL* (from Python - ``__cause__ is Ellipsis``). If the cause is :const:`None`, the default - exception display routines stop showing the context chain. - .. c:function:: void PyException_SetCause(PyObject *ex, PyObject *ctx) @@ -482,9 +478,7 @@ Exception Objects it. There is no type check to make sure that *ctx* is either an exception instance or :const:`None`. This steals a reference to *ctx*. - If the cause is set to :const:`None` the default exception display - routines will not display this exception's context, and will not follow the - chain any further. + :attr:`__suppress_context__` is implicitly set to ``True`` by this function. .. _unicodeexceptions: |