5 ms·
Python Tail Call Optimization Decorator
- tumult 17y agoTail 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.
- wrs 17y agoOh my -- "optimization" is a very poor choice of word here!
- arebop 17y agoSee also an alternative implementation in the LTU discussion http://lambda-the-ultimate.org/node/1331#comment-15165 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/ObjectOrientedTailRecursion http://projectfortress.sun.com/Projects/Community/blog/Objec...