A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2007-October/074913.html below:

[Python-Dev] Explicit Tail Calls

[Python-Dev] Explicit Tail Calls [Python-Dev] Explicit Tail CallsAdam Olsen rhamph at gmail.com
Fri Oct 12 20:19:58 CEST 2007
On 10/12/07, Shane Hathaway <shane at hathawaymix.org> wrote:
> Shane Hathaway wrote:
> > Shane Hathaway wrote:
> >> I'm interested in seeing a good way to write tail calls in Python.  Some
> >> algorithms are more readable when expressed using tail recursion.
> >
> > About ten seconds after I wrote the previous message, I realized two things:
> >
> > - It's easy to write "return Return" instead of "raise Return".  So
> > "raise TailCall" is probably better.
> >
> > - I can write a complete implementation of this idea with nothing but a
> > simple decorator.  Check it out!
>
> With yet another 10 seconds, I realized my quick implementation actually
> does nothing to optimize tail calls.  Working on a fix.

Since they're not going to be accepted into python anyway, the
implementation is off-topic for python-dev.  Please take them up
elsewhere (such as my offer to discuss in private.)

-- 
Adam Olsen, aka Rhamphoryncus
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4