Possibly Pythonic Tail Call Optimization (TCO/TRE)

Gregory Ewing greg.ewing at canterbury.ac.nz
Wed Jul 15 01:52:21 EDT 2015


Marko Rauhamaa wrote:

> It might even be tail-call optimized by Python. Only you can't count on
> it because the language spec doesn't guarantee it.

The language spec might permit it, but the BDFL has
explicitly expressed a dislike for the idea of implicit
tail call removal, so it's unlikely to ever happen
in CPython.

-- 
Greg



More information about the Python-list mailing list