4 ms·
Yes, use sys.setrecursionlimit(n) to change the max recursion depth. Max supported stack depth of course varies by platform. In many cases, a better solution i
by pash 15y ago
Yes, use sys.setrecursionlimit(n) to change the max recursion depth. Max supported stack depth of course varies by platform.
In many cases, a better solution is to implement tail recursion, which can be done quite easily. See http://paulbutler.org/archives/tail-recursion-in-python/ http://paulbutler.org/archives/tail-recursion-in-python/ .