On 21 Oct 2006 01:31:55 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Theerasak Photha: > > I guess Python isn't tail-recursive then? > > Right. > > > > Well, algorithms seem to be more naturally expressed iteratively in > > Python, and to be fair, most uses of recursion you see in e.g., Scheme > > textbooks are really just grandstanding in the real world. > > Still, some algorithms enjoy some recursivity anyway, like some graph > or tree exploration, structure flattening, and so on, for them I > sometimes use recursivity in Python too.
That's absolutely true. However, it is probably unusual in most circumstances for such recursions to blow through more than a thousand stack frames. -- Theerasak -- http://mail.python.org/mailman/listinfo/python-list