[Python-ideas] Tail recursion elimination

Haoyi Li haoyi.sg at gmail.com
Sun Jan 19 04:42:00 CET 2014


MacroPy also has an implementation of TCO implemented using trampolining.
It trades stack introspection for load-time-analysis, which could be a win
or a loss depending on how you view things.
------------------------------
From: Ryan
Sent: 1/18/2014 4:57 PM
To: musicdenotation at gmail.com; Joao S. O. Bueno; python-ideas at python.org
Subject: Re: [Python-ideas] Tail recursion elimination

I wrote one that uses decorators. How is that special syntax?

musicdenotation at gmail.com wrote:
>
> On Jan 18, 2014, at 22:08, "Joao S. O. Bueno" <jsbueno at python.org.br>
> wrote:
>
>
> You can use tail recursion elimination in Python as it is today.
>
> I have seen many "implementations" of tail-call optimization, and their
> common problem is that they all require special syntax to work. I need a
> solution that is directly usable with Python's orrdinary *return*statement.
>
> ------------------------------
>
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
>
-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140118/0e41ab2e/attachment-0001.html>


More information about the Python-ideas mailing list