We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
async with
async for
When working with async generators, it is often advised, using something like aclosing or trio_async_generator to implement a pattern like:
async
aclosing
trio_async_generator
async with my_generator() as values: async for x in values: ...
which unnecessarily creates two nested blocks in a relatively non-ergonomic way. Instead, we could have a single syntax like
async with for x in my_generator(): ...
that compiles to the code above.
The text was updated successfully, but these errors were encountered:
Add async with for
312882e
Resolves #753.
No branches or pull requests
When working with
async
generators, it is often advised, using something likeaclosing
ortrio_async_generator
to implement a pattern like:which unnecessarily creates two nested blocks in a relatively non-ergonomic way. Instead, we could have a single syntax like
that compiles to the code above.
The text was updated successfully, but these errors were encountered: