-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
bpo-33649: Add a high-level section about Futures; few quick fixes #9403
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
Conversation
willingc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @1st1. A few small suggestions.
Doc/library/asyncio-task.rst
Outdated
| with regards to cancellation and introspection. | ||
|
|
||
| Many asyncio APIs are documented to accept coroutines, Tasks, or | ||
| Futures. What it means is that they are ready to accept anything |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By doing so, the async APIs are ready to accept anything which you can await on.
Doc/library/asyncio-task.rst
Outdated
|
|
||
| Return a Future aggregating results from the given coroutine objects, | ||
| Tasks, or Futures. | ||
| Return a :class:`Future` aggregating results from the given |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*fs is used in this section without any prior mention on the page. We should have a brief verbal description here.
|
@willingc Carol, I decided to introduce awaitables and use them to simplify (hopefully!) the docs. Please take another look. |
willingc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love it! I think awaitables will simplify understanding a bit. Then, we can work toward high level guidance on what is Task, Future, Coroutine are and when to consider using. ![]()
|
Great suggestion @elprans re: *fs sequence 👍 |
|
Thanks @1st1 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7. |
…ythonGH-9403) Co-authored-by: Elvis Pranskevichus <elvis@magic.io> (cherry picked from commit 4715039) Co-authored-by: Yury Selivanov <yury@magic.io>
|
GH-9409 is a backport of this pull request to the 3.7 branch. |
https://bugs.python.org/issue33649