summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/exceptions.rst
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2015-07-03 05:04:23 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2015-07-03 05:04:23 (GMT)
commitf488fb422a641aa7c38eb63c09f459e4baff7bc4 (patch)
treef09d64f919af622c0ebf28adb9a3bfec567e47c8 /Doc/c-api/exceptions.rst
parent27be130ec71fa95e2496bd9e42505aa6c7457682 (diff)
downloadcpython-f488fb422a641aa7c38eb63c09f459e4baff7bc4.zip
cpython-f488fb422a641aa7c38eb63c09f459e4baff7bc4.tar.gz
cpython-f488fb422a641aa7c38eb63c09f459e4baff7bc4.tar.bz2
Issue #19235: Add new RecursionError exception. Patch by Georg Brandl.
Diffstat (limited to 'Doc/c-api/exceptions.rst')
-rw-r--r--Doc/c-api/exceptions.rst12
1 files changed, 9 insertions, 3 deletions
diff --git a/Doc/c-api/exceptions.rst b/Doc/c-api/exceptions.rst
index 6ae723b..3fd69ba 100644
--- a/Doc/c-api/exceptions.rst
+++ b/Doc/c-api/exceptions.rst
@@ -683,12 +683,12 @@ recursion depth automatically).
sets a :exc:`MemoryError` and returns a nonzero value.
The function then checks if the recursion limit is reached. If this is the
- case, a :exc:`RuntimeError` is set and a nonzero value is returned.
+ case, a :exc:`RecursionError` is set and a nonzero value is returned.
Otherwise, zero is returned.
*where* should be a string such as ``" in instance check"`` to be
- concatenated to the :exc:`RuntimeError` message caused by the recursion depth
- limit.
+ concatenated to the :exc:`RecursionError` message caused by the recursion
+ depth limit.
.. c:function:: void Py_LeaveRecursiveCall()
@@ -800,6 +800,8 @@ the variables:
+-----------------------------------------+---------------------------------+----------+
| :c:data:`PyExc_ProcessLookupError` | :exc:`ProcessLookupError` | |
+-----------------------------------------+---------------------------------+----------+
+| :c:data:`PyExc_RecursionError` | :exc:`RecursionError` | |
++-----------------------------------------+---------------------------------+----------+
| :c:data:`PyExc_ReferenceError` | :exc:`ReferenceError` | \(2) |
+-----------------------------------------+---------------------------------+----------+
| :c:data:`PyExc_RuntimeError` | :exc:`RuntimeError` | |
@@ -829,6 +831,9 @@ the variables:
:c:data:`PyExc_PermissionError`, :c:data:`PyExc_ProcessLookupError`
and :c:data:`PyExc_TimeoutError` were introduced following :pep:`3151`.
+.. versionadded:: 3.5
+ :c:data:`PyExc_RecursionError`.
+
These are compatibility aliases to :c:data:`PyExc_OSError`:
@@ -877,6 +882,7 @@ These are compatibility aliases to :c:data:`PyExc_OSError`:
single: PyExc_OverflowError
single: PyExc_PermissionError
single: PyExc_ProcessLookupError
+ single: PyExc_RecursionError
single: PyExc_ReferenceError
single: PyExc_RuntimeError
single: PyExc_SyntaxError