[issue40405] asyncio.as_completed documentation misleading

2020-05-23 Thread Kyle Stanley
Kyle Stanley added the comment: Thanks for bring this to our attention and working on this Bar Harel, and thanks to Yury for the suggestions. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue40405] asyncio.as_completed documentation misleading

2020-05-23 Thread miss-islington
miss-islington added the comment: New changeset 9181e2e2f3ade85f65bf2521a5deb898434dfd64 by Miss Islington (bot) in branch '3.9': bpo-40405: Fix asyncio.as_completed docs (GH-19753) https://github.com/python/cpython/commit/9181e2e2f3ade85f65bf2521a5deb898434dfd64 --

[issue40405] asyncio.as_completed documentation misleading

2020-05-23 Thread miss-islington
miss-islington added the comment: New changeset 2fecb48a1d84190c37214eb4b0c8d5460300a78b by Miss Islington (bot) in branch '3.8': bpo-40405: Fix asyncio.as_completed docs (GH-19753) https://github.com/python/cpython/commit/2fecb48a1d84190c37214eb4b0c8d5460300a78b --

[issue40405] asyncio.as_completed documentation misleading

2020-05-23 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 9.0 -> 10.0 pull_requests: +19605 pull_request: https://github.com/python/cpython/pull/20337 ___ Python tracker

[issue40405] asyncio.as_completed documentation misleading

2020-05-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +19606 pull_request: https://github.com/python/cpython/pull/20338 ___ Python tracker ___

[issue40405] asyncio.as_completed documentation misleading

2020-05-23 Thread Kyle Stanley
Kyle Stanley added the comment: New changeset 13206b52d16c2489f4c7dd2dce2a7f48a554b5ed by Bar Harel in branch 'master': bpo-40405: Fix asyncio.as_completed docs (GH-19753) https://github.com/python/cpython/commit/13206b52d16c2489f4c7dd2dce2a7f48a554b5ed --

[issue40405] asyncio.as_completed documentation misleading

2020-04-29 Thread Kyle Stanley
Kyle Stanley added the comment: @Bar as requested by Guido, let's continue the discussion in the PR: https://github.com/python/cpython/pull/19753#pullrequestreview-403185142. -- ___ Python tracker

[issue40405] asyncio.as_completed documentation misleading

2020-04-29 Thread Bar Harel
Bar Harel added the comment: @Kyle, looks good to me. Maybe this will work better? Together with the current example which shows the "earliest_result" variable of course. "Each coroutine returns the next result from the set of the remaining awaitables, based upon the order of completion."

[issue40405] asyncio.as_completed documentation misleading

2020-04-28 Thread Guido van Rossum
Guido van Rossum added the comment: Please work this out in the PR between the two of you, Kyle and Bar. -- ___ Python tracker ___

[issue40405] asyncio.as_completed documentation misleading

2020-04-28 Thread Kyle Stanley
Kyle Stanley added the comment: Alternatively, I think "can wait for" would also read better than "allows to wait for", if that is preferred over my above suggestion. -- ___ Python tracker

[issue40405] asyncio.as_completed documentation misleading

2020-04-28 Thread Kyle Stanley
Kyle Stanley added the comment: > based upon the order of completion I forgot to explain this in the above message. I think something that mentions "order of completion" should be included. Although it's implied in the name `as_completed`, to me it seems worthwhile to be fully explicit with

[issue40405] asyncio.as_completed documentation misleading

2020-04-28 Thread Kyle Stanley
Kyle Stanley added the comment: Yury Selivanov wrote: > I'd suggest to change to: "Return an iterator of coroutines. Each coroutine > allows to wait for the earliest next result from the set of the remaining > awaitables." The first sentence looks good to me, but I'm not certain about the

[issue40405] asyncio.as_completed documentation misleading

2020-04-28 Thread Bar Harel
Change by Bar Harel : -- keywords: +patch pull_requests: +19074 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/19753 ___ Python tracker

[issue40405] asyncio.as_completed documentation misleading

2020-04-27 Thread Yury Selivanov
Yury Selivanov added the comment: > @Yury what do you think? Yeah, the documentation needs to be fixed. > Maybe "Returns an iterator of awaitables"? I'd suggest to change to: "Return an iterator of coroutines. Each coroutine allows to wait for the earliest next result from the set of the

[issue40405] asyncio.as_completed documentation misleading

2020-04-27 Thread Guido van Rossum
Guido van Rossum added the comment: Oh, you're right. The docstring correctly says this. :-( Do you have the power to submit a PR? I think it should just say that the return values are coroutines (which is what it does). @Yury what do you think? -- resolution: not a bug ->

[issue40405] asyncio.as_completed documentation misleading

2020-04-27 Thread Bar Harel
Bar Harel added the comment: It's a coroutine. Basically the same coroutine yielded over and over, returning the first future's result each time. Like I said, I'm not entirely sure how to phrase it. Maybe "Returns an iterator of awaitables"? --

[issue40405] asyncio.as_completed documentation misleading

2020-04-27 Thread Guido van Rossum
Guido van Rossum added the comment: Reopening so as to give the OP one more chance to state their case. They wrote: """ You've immediately closed the issue so I couldn't even reply to it, Unfortunately, it doesn't return a Future object at all, so technically you're wrong, together with the

[issue40405] asyncio.as_completed documentation misleading

2020-04-27 Thread Guido van Rossum
Guido van Rossum added the comment: I declare this not a bug. The docs do not promise that the Futures being returned are the *same* Futures that were passed in. They are not. They are (or at least may be) new Futures that represent the same event. Since Futures, when used as dict keys, use

[issue40405] asyncio.as_completed documentation misleading

2020-04-27 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40405] asyncio.as_completed documentation misleading

2020-04-27 Thread Bar Harel
Change by Bar Harel : -- title: ast -> asyncio.as_completed documentation misleading ___ Python tracker ___ ___ Python-bugs-list