eryksun added the comment: I don't know about OS X, but in 64-bit Linux I can increase the recursion limit to 100000 if I allow the main thread to grow to 64 MiB by setting the RLIMIT_STACK soft limit. For example:
soft, hard = resource.getrlimit(resource.RLIMIT_STACK) soft = max(soft, 64 << 20) if hard != resource.RLIM_INFINITY: soft = min(soft, hard) resource.setrlimit(resource.RLIMIT_STACK, (soft, hard)) Alternatively it also works to use a worker thread with a fixed 64 MiB stack size, set as follows: old_size = threading.stack_size(64 << 20) # create worker thread threading.stack_size(old_size) ---------- nosy: +eryksun _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25323> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com