maximum recursion depth

Paul phsdv.remove at earthlink.net
Sun Jul 21 02:45:14 EDT 2002


unfortunately it is not just memory...
it will (did) crash when the stack size is full, which is only a fraction of
the total memory space... right?

python used less than 6MByte (less than 1% of total) when it crashed with a
much higher limit set for the recursion depth.
It took an awful lot of processing time as well... Have to rethink my
strategy here.

P.

"Tim Peters" <tim.one at comcast.net> wrote in message
news:mailman.1027230329.19568.python-list at python.org...
> [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