diff options
author | Tal Einat <taleinat+github@gmail.com> | 2019-07-06 12:35:24 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-06 12:35:24 (GMT) |
commit | fcf1d003bf4f0100c9d0921ff3d70e1127ca1b71 (patch) | |
tree | 77d6f9323162ee6455a14da9c4f9bb78640284ae /Doc/library/idle.rst | |
parent | 45bc61b97178b27ae05bd3eb95481bf0325795bb (diff) | |
download | cpython-fcf1d003bf4f0100c9d0921ff3d70e1127ca1b71.zip cpython-fcf1d003bf4f0100c9d0921ff3d70e1127ca1b71.tar.gz cpython-fcf1d003bf4f0100c9d0921ff3d70e1127ca1b71.tar.bz2 |
bpo-26806: add 30 to the recursion limit in IDLE's shell (GH-13944)
This is done to compensate for the extra stack frames added by
IDLE itself, which cause problems when setting the recursion limit
to low values.
This wraps sys.setrecursionlimit() and sys.getrecursionlimit()
as invisibly as possible.
Diffstat (limited to 'Doc/library/idle.rst')
-rw-r--r-- | Doc/library/idle.rst | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Doc/library/idle.rst b/Doc/library/idle.rst index fb886a7..de58f26 100644 --- a/Doc/library/idle.rst +++ b/Doc/library/idle.rst @@ -713,6 +713,10 @@ or ``print`` or ``write`` to sys.stdout or sys.stderr, IDLE should be started in a command line window. The secondary subprocess will then be attached to that window for input and output. +The IDLE code running in the execution process adds frames to the call stack +that would not be there otherwise. IDLE wraps ``sys.getrecursionlimit`` and +``sys.setrecursionlimit`` to reduce the effect of the additional stack frames. + If ``sys`` is reset by user code, such as with ``importlib.reload(sys)``, IDLE's changes are lost and input from the keyboard and output to the screen will not work correctly. |