[Python-Dev] Re: Proper tail recursion (original) (raw)

Paul Prescod paul at prescod.net
Fri Jul 16 16:31:13 CEST 2004


Andrew Koenig wrote:

Where the recursion limit really bites me is the inability to do recursive depth first search on big graphs. Of course, I can simulate the stack myself and write the rest iteratively, but if I wanted to do that I'd go back to writing in assembly language.

+1. If you think you don't care about recursive depth-first searches on big graphs, think again: Pickling is an example of such an algorithm. I haven't looked at how it's actually implemented, but it seems to me that either the implementation must simulate recursion manually or it will fail on linked data structures that are bigger than the recursion limit.

http://mail.python.org/pipermail/python-list/2003-November/193953.html http://mail.python.org/pipermail/python-list/2003-November/193956.html

Paul Prescod



More information about the Python-Dev mailing list