New submission from Atsushi Sakai <asak...@gmail.com>: 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')}") ---------- assignee: docs@python components: Documentation messages: 395728 nosy: AtsushiSakai, docs@python priority: normal severity: normal status: open title: A "Coroutines and Tasks" code example needs "asyncio.run(main())" type: enhancement versions: Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44407> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com