

Python Tail Call Optimization Decorator  - mace
http://code.activestate.com/recipes/474088/

======
tumult
Tail _recursion_ optimization, not all calls. So no continuations, etc.

And it's probably slow as hell.

And I'll knife you if I see you using Python like this.

------
arebop
See also an alternative implementation in the LTU discussion <http://lambda-
the-ultimate.org/node/1331#comment-15165>.

Also, for those who missed it, Guy Steele's older post about why tail calls
are important:
[http://projectfortress.sun.com/Projects/Community/blog/Objec...](http://projectfortress.sun.com/Projects/Community/blog/ObjectOrientedTailRecursion)

------
wrs
Oh my -- "optimization" is a very poor choice of word here!

~~~
ekiru
Tail call optimization primarily optimizes memory, not time. It will reduce
time costs, too(assuming calls are more expensive than jumps, which would
probably be true in any architecture), but the memory used is the main issue.

