Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delegating to subgenerator (PEP 380) #49

Closed
lunik1 opened this issue Jan 8, 2021 · 2 comments · Fixed by #57
Closed

Delegating to subgenerator (PEP 380) #49

lunik1 opened this issue Jan 8, 2021 · 2 comments · Fixed by #57

Comments

@lunik1
Copy link

lunik1 commented Jan 8, 2021

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?

@BenLauwens
Copy link
Collaborator

I am not familiar with this PEP.
I will put this on my reading list;)
Kind regards

Ben

@gerlero
Copy link
Member

gerlero commented Nov 28, 2022

If this is ever implemented, it would be ideal to allow @resumables to return values (as is also part of that PEP).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants