diff options
| author | Victor Stinner <victor.stinner@gmail.com> | 2015-10-13 00:11:21 +0200 |
|---|---|---|
| committer | Victor Stinner <victor.stinner@gmail.com> | 2015-10-13 00:11:21 +0200 |
| commit | 50856d5ae745d1c9f691afbd78572bf073c941cf (patch) | |
| tree | d628ac3d10d0fa02551a8a45d43c03d948306600 /Doc/library/sys.rst | |
| parent | 60f26691f5aeff555f27c62aee11efb07e20ecdc (diff) | |
| download | cpython-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/sys.rst')
| -rw-r--r-- | Doc/library/sys.rst | 7 |
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) |
