RuntimeError: maximum recursion depth exceeded
This can be solved by increasing the recursion limit
import sys
sys.setrecursionlimit(2000)
However, the default limit is there for a reason. The limit can prevent infinite recursion from overflowing the C stack. This will crash Python.
No comments:
Post a Comment