maximum recursion depth

Tim Peters tim.one at comcast.net
Sun Jul 21 01:42:13 EDT 2002


[Paul]
> ...
> Can I optimize my code so that there will be less recursion? yes, but my
> recursion depth will still be over 1000 times...
> Can I rewrite my code without recursion? Maybe, but I do not want to.
>
> My question to you: Is there a way to change the limit of the recursion
> depth?

You've been correctly pointed at sys.setrecursionlimit(), but you should be
aware that unless you bought one of those new-fangled machines with infinite
memory <wink>, your program will eventually crash.






More information about the Python-list mailing list