[Python-Dev] Limiting the recursion limit

skip at pobox.com skip at pobox.com
Wed Jan 11 15:37:49 CET 2006


    >>> sys.setrecursionlimit(1<<30)
    >>> f = lambda f:f(f)
    >>> f(f)
    Segmentation fault

Is there some way that Python can determine that 1<<30 is an unreasonable
recursion limit?

Skip


More information about the Python-Dev mailing list