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

Teach st.functions() to create generators and async functions in addition to plain functions #4149

Open
Zac-HD opened this issue Oct 29, 2024 · 0 comments
Labels
enhancement it's not broken, but we want it to be better

Comments

@Zac-HD
Copy link
Member

Zac-HD commented Oct 29, 2024

I think the natural way to do this is keying it off the like= argument, and wrap the standard implementation for each await/iteration... if that works with the inferred-return-type logic. We do need to branch on the result from inspect.is* at some point, to define functions with the same characteristics!

Maybe @proxies should also do this? We'd still need to handle the yielding of generators...

This would technically be a compatibility break, almost only of things that don't work at the moment, but we'll want to check that before shipping it in a non-major version.

@Zac-HD Zac-HD added the enhancement it's not broken, but we want it to be better label Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement it's not broken, but we want it to be better
Projects
None yet
Development

No branches or pull requests

1 participant