I'm interested in sequels , particularly in the Python C-API. From what I understand, the nature of continuations requires not abstracting the low-level calling conventions in order to manipulate the call stack as needed. I was fortunate enough to meet several examples of these scattered here and there . In a few examples that I came across, this abstraction is done using smart C (with environmental assumptions) or a custom assembly.
However, what is cool about Python is that it has its own interpreter stack, consisting of PyFrameObject s. Assuming single-threaded applications at the moment, shouldn't it be enough just to enable and disable PyFrameObjects to implement extensions in the Python C-API ? Why do these authors even worry about low-level materials?
source share