From: sobolevn Date: Thu, 23 Jan 2025 18:08:51 +0000 (+0300) Subject: gh-91048: Improve example in `asyncio-graph.rst` doc (#129224) X-Git-Tag: v3.14.0a5~263 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c05a851ac59e6fb7bd433677b9c116fb8336a8b1;p=thirdparty%2FPython%2Fcpython.git gh-91048: Improve example in `asyncio-graph.rst` doc (#129224) --- diff --git a/Doc/library/asyncio-graph.rst b/Doc/library/asyncio-graph.rst index fc8edeb426c5..814bfe6e269b 100644 --- a/Doc/library/asyncio-graph.rst +++ b/Doc/library/asyncio-graph.rst @@ -59,13 +59,13 @@ and debuggers. async def main(): async with asyncio.TaskGroup() as g: - g.create_task(test()) + g.create_task(test(), name='test') asyncio.run(main()) will print:: - * Task(name='Task-2', id=0x1039f0fe0) + * Task(name='test', id=0x1039f0fe0) + Call stack: | File 't2.py', line 4, in async test() + Awaited by: