maximum recursion depth?

alex23 wuwei23 at gmail.com
Tue May 27 19:54:46 EDT 2008


On May 28, 9:26 am, globalrev <skanem... at yahoo.se> wrote:
> is there a definitie limit to the nbr of calls or is the memory that
> runs out? is that then the RAMmemory? is there a special amount of
> memory assigned for python or it just takes and takes until windows
> runs out of it?

You can alter the recursion limit using sys.setrecursionlimit:

    setrecursionlimit(n)

    Set the maximum depth of the Python interpreter stack to n.  This
    limit prevents infinite recursion from causing an overflow of the
C
    stack and crashing Python.  The highest possible limit is
platform-
    dependent.



More information about the Python-list mailing list