March 2003
Intermediate to advanced
656 pages
39h 30m
English
setrecursionlimit
setrecursionlimit(limit)Sets the limit on the depth of Python’s call stack
(the default is 1000). The limit prevents runaway
recursion from crashing Python. Raising the limit may be necessary
for programs that rely on deep recursion, but most platforms cannot
support very large limits on call-stack depth. Lowering the limit may
help you check, during debugging, that your program is gracefully
degrading under situations of almost-runaway recursion. See also
Section 4.10.9.