5 ms·
I'm ashamed to admit that I actually learnt something new from this (the @tailcall thing)
by sriramk 17y ago
I'm ashamed to admit that I actually learnt something new from this (the @tailcall thing)
- pmiller2 17y agoYou should never be ashamed to admit ignorance, especially after it's been cured. :-)
- pgbovine 17y agowait, is @tailcall part of the Python standard library? or just something the author made-up for illustrative purposes?
- notaddicted 17y agoI just tried typing it into the interpreter in 2.6 and 3, it doesn't appear to exist.
- bdr 17y agomade up http://neopythonic.blogspot.com/2009/04/final-words-on-tail-calls.html http://neopythonic.blogspot.com/2009/04/final-words-on-tail-...
- sophacles 17y agoThere are a few /very/ hacky @tailcall decorators floating around the web. In some cases they actually speed things up some small amount. A year or two ago there was a bug furor over bytecode hacking -- such things were the result :)
- micheles 17y agoYou can find a version of tailcall in the Python cookbook or here: http://pypi.python.org/pypi/decorator#dealing-with-third-party-decorators http://pypi.python.org/pypi/decorator#dealing-with-third-par...