Message395728
This is very small documentation improvement proposal.
In the "Coroutines and Tasks" doc, the code example after "Let’s modify the above example and run two say_after coroutines concurrently:" is missing "asyncio.run(main())" at the end of the code example:
async def main():
task1 = asyncio.create_task(
say_after(1, 'hello'))
task2 = asyncio.create_task(
say_after(2, 'world'))
print(f"started at {time.strftime('%X')}")
# Wait until both tasks are completed (should take
# around 2 seconds.)
await task1
await task2
print(f"finished at {time.strftime('%X')}") |
|
Date |
User |
Action |
Args |
2021-06-13 05:17:43 | AtsushiSakai | set | recipients:
+ AtsushiSakai, docs@python |
2021-06-13 05:17:43 | AtsushiSakai | set | messageid: <1623561463.56.0.048465518238.issue44407@roundup.psfhosted.org> |
2021-06-13 05:17:43 | AtsushiSakai | link | issue44407 messages |
2021-06-13 05:17:43 | AtsushiSakai | create | |
|