ID EN
Sys

setrecursionlimit

Python 3.11

Set the maximum depth of the Python interpreter stack to limit. This limit prevents infinite recursion from causing an overflow of the C stack and crashing Python.

Syntax

PYTHON
sys.setrecursionlimit(limit)

See Also

RecursionError RecursionError