Chris Angelico <ros...@gmail.com> writes: > My point was that I have yet to see anything that demands TCO and > can't be algorithmically improved.
I don't think anyone claimed you can't simulate TCO with updateable variables and a while loop. TCO just sometimes lets you write some things in a cleaner (in proponnets' view) style. > The best so far has been a quicksort that uses TCO to guarantee a > maximum on stack usage. I actually thought the state machine example was more convincing. Doing that without TCO would have required some kind of explicit control loop and a messy dispatch mechanism instead of direct chaining from one state to the next. -- https://mail.python.org/mailman/listinfo/python-list