PyDocs

Nav

Python Runtime Services

setrecursionlimit

sys

function
  • setrecursionlimit(limit)
Set the maximum depth of the Python interpreter stack to n.

This limit prevents infinite recursion from causing an overflow of the C
stack and crashing Python.  The highest possible limit is platform-
dependent.
Changed in 3.5.1
  • 3.5.1: A RecursionError exception is now raised if the new limit is too low at the current recursion depth.
0 Examples
No examples for sys/setrecursionlimit.
See Also
No see-alsos for sys/setrecursionlimit
0 Notes
No notes for setrecursionlimit