3 ms·
This doesn't help in quite the way you would like, but the recursion limit is adjustable through sys.setrecursionlimit [1]. [1]http://docs.python.org/2/library
by chas 13y ago
This doesn't help in quite the way you would like, but the recursion limit is adjustable through sys.setrecursionlimit [1].
[1]http://docs.python.org/2/library/sys.html#sys.setrecursionlimit http://docs.python.org/2/library/sys.html#sys.setrecursionli...
- Vaskivo 13y agoThe problem is not that there is a hardcoded limit. Python just isn't suited for heavy recursion. As for tail-call optimization, here's Guido's opinion (which I agree): http://neopythonic.blogspot.pt/2009/04/tail-recursion-elimination.html http://neopythonic.blogspot.pt/2009/04/tail-recursion-elimin...