is there any equivalent construct for continuations in python. I have been reading about continuations and am just being curious and want to know as there is nothing about that in the docs.
is there any equivalent construct for continuations in python. I have been reading about
Share
They are expressed the same way in Python as in any other language without call/cc: by passing a function as the continuation argument to another function. Consider the very silly example of a continuation that is applied to the sum of two numbers. In ML, you might write
which prints 6.
but in Python you might write
which also prints 6.