Gregory Ewing <greg.ew...@canterbury.ac.nz>:

> 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.

Permitting wouldn't be enough.

The other problem for tail call elimination is the requirement that
functions return None by default. Smooth tail call elimination would
require that Python leave the default return value unspecified.


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to