Possibly Pythonic Tail Call Optimization (TCO/TRE)

Gregory Ewing greg.ewing at canterbury.ac.nz
Sun Jul 19 00:57:27 CEST 2015


Antoon Pardon wrote:
> It seems a bit strange that with the immense value that is given to 
> stack frames, that these wouldn't be available somehow.

There was discussion recently about the idea of providing
access to the frame of a suspended generator, so that
debuggers can inspect the stack of an asyncio task that's
not currently running.

The same mechanism ought to allow the state of an arbitrary
generator to be examined. You'd need to explicitly ask
for it, though -- it wouldn't appear in stack traces
automatically.

-- 
Greg


More information about the Python-list mailing list