On 10/4/2013 6:46 AM, Ian Kelly wrote:

On the other hand, if you start optimizing every tail call and not
just the recursive functions, then I can see where that could start to
get problematic for debugging -- as arbitrary functions get removed
from the stack traces just because they happened to end in tail calls.

The idea of CPython space-optimizing tail calls when the call is made has been suggested on python-ideas. Guido verified that it is technically possible with the current bytecode interpreter but rejected it because it would arbitrarily mess up stack traces.

--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to