summaryrefslogtreecommitdiff
path: root/Doc/library
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-10-13 00:11:21 +0200
committerVictor Stinner <victor.stinner@gmail.com>2015-10-13 00:11:21 +0200
commit50856d5ae745d1c9f691afbd78572bf073c941cf (patch)
treed628ac3d10d0fa02551a8a45d43c03d948306600 /Doc/library
parent60f26691f5aeff555f27c62aee11efb07e20ecdc (diff)
downloadcpython-git-50856d5ae745d1c9f691afbd78572bf073c941cf.tar.gz
sys.setrecursionlimit() now raises RecursionError
Issue #25274: sys.setrecursionlimit() now raises a RecursionError if the new recursion limit is too low depending at the current recursion depth. Modify also the "lower-water mark" formula to make it monotonic. This mark is used to decide when the overflowed flag of the thread state is reset.
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/sys.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst
index 72f5d1fd01..f6325cc8c1 100644
--- a/Doc/library/sys.rst
+++ b/Doc/library/sys.rst
@@ -975,6 +975,13 @@ always available.
that supports a higher limit. This should be done with care, because a too-high
limit can lead to a crash.
+ If the new limit is too low at the current recursion depth, a
+ :exc:`RecursionError` exception is raised.
+
+ .. versionchanged:: 3.5.1
+ A :exc:`RecursionError` exception is now raised if the new limit is too
+ low at the current recursion depth.
+
.. function:: setswitchinterval(interval)