Monday, August 8, 2011

PYTHON RuntimeError: maximum recursion depth exceeded in cmp


if your python code produces the following error: “RuntimeError: maximum recursion depth exceeded in cmp,” try adding this line to the beginning of your code:
sys.setrecursionlimit(1500)
note that python’s default limit is 1000.

No comments:

Post a Comment