ResumableFunctions.jl
ResumableFunctions.jl copied to clipboard
Delegating to subgenerator (PEP 380)
In Python the yield from
syntax described in PEP 380 allows a generator to delegate to a subgenerator, with the subgenerator then able to yield to the caller of the original generator. This is useful for factoring code out of more complex generator functions, and when working with recursive generator functions.
Would it be possible to support delegation like this in ResumableFunctions.jl?
I am not familiar with this PEP. I will put this on my reading list;) Kind regards
Ben
If this is ever implemented, it would be ideal to allow @resumable
s to return values (as is also part of that PEP).