The Python Oracle

What is the maximum recursion depth in Python, and how to increase it?

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Magical Minnie Puzzles

--

Chapters
00:00 Question
00:38 Accepted answer (Score 755)
01:34 Answer 2 (Score 173)
01:49 Answer 3 (Score 71)
02:43 Answer 4 (Score 67)
03:31 Thank you

--

Full question
https://stackoverflow.com/questions/3323...

Accepted answer links:
[sys.getrecursionlimit]: https://docs.python.org/library/sys.html...
[sys.setrecursionlimit]: https://docs.python.org/library/sys.html...

Answer 2 links:
[set a higher recursion depth]: https://docs.python.org/library/sys.html...

Answer 3 links:
[context manager]: https://docs.python.org/3/reference/data...

Answer 4 links:
[Python documentation]: https://docs.python.org/library/sys.html...
[setrecursionlimit()]: https://docs.python.org/library/sys.html...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #recursion

#avk47