On 1/11/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > >>> 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?
Yes, but that doesn't help -- there's some value in the middle where you may or may not get a crash depending on random other stuff that is going on, and the only way to know is to try. It's easy enough to code a loop that tries higher and higher values until it finds a crash. -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com