Chris Angelico <ros...@gmail.com>: > Guido is against anything that disrupts tracebacks, and optimizing > tail recursion while maintaining traceback integrity is rather harder.
Tail recursion could be suppressed during debugging. Optimized code can play all kinds of non-obvious tricks with the execution frame. > In the situations where it really is simple, you can always make the > change in your own code anyway. Often, the process of converting > recursion into tail recursion warps the code to the point where it's > abusing recursion to implement iteration anyway, so just make it > iterative. While you shouldn't actively replace Python iteration with recursion, I strongly disagree that naturally occurring tail recursion is abuse or should be avoided in any manner. Marko -- https://mail.python.org/mailman/listinfo/python-list