Tail Call Optimization as a Decorator

Michel Salim michel.salim at gmail.com
Fri Mar 3 14:02:02 EST 2006


Neat stuff! I commented on the ActiveState post, but for completeness,
I modified your code to support mutual recursions, and used jorend's
isTailCall() to make it safe to call an optimized function in a
non-tail-call context.

http://the-dubois-papers.blogspot.com/2006/03/python-tail-call-decorator.html




More information about the Python-list mailing list