Possibly Pythonic Tail Call Optimization (TCO/TRE)

Chris Angelico rosuav at gmail.com
Tue Jul 14 15:43:22 CEST 2015


On Tue, Jul 14, 2015 at 11:38 PM, Marko Rauhamaa <marko at pacujo.net> wrote:
> Chris Angelico <rosuav at gmail.com>:
>
>> On Tue, Jul 14, 2015 at 10:28 PM, Marko Rauhamaa <marko at pacujo.net> wrote:
>>> I would rather optimize by default and disable optimizations with
>>> --debug or equivalent.
>>
>> That assumes that it's simply an optimization. This is a distinct
>> semantic change.
>
> 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.

ChrisA


More information about the Python-list mailing list