Possibly Pythonic Tail Call Optimization (TCO/TRE)

Marko Rauhamaa marko at pacujo.net
Tue Jul 14 13:29:23 EDT 2015


Chris Angelico <rosuav at gmail.com>:

> On Tue, Jul 14, 2015 at 11:38 PM, Marko Rauhamaa <marko at pacujo.net> wrote:
>> No, tail call optimization doesn't change the behavior of the
>> program, for the worse anyway.
>
> It does, because you lose traceback records. That's pretty significant
> when you come to try to debug something.

Doesn't count. Optimization can do weird things to code and make
debugging challenging. That's why you usually tell the compiler not to
optimize the debug builds.


Marko



More information about the Python-list mailing list