Skip to content

Commit c05a851

Browse files
authored
pythongh-91048: Improve example in asyncio-graph.rst doc (python#129224)
1 parent 0b15d9c commit c05a851

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/library/asyncio-graph.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ and debuggers.
5959
6060
async def main():
6161
async with asyncio.TaskGroup() as g:
62-
g.create_task(test())
62+
g.create_task(test(), name='test')
6363
6464
asyncio.run(main())
6565
6666
will print::
6767

68-
* Task(name='Task-2', id=0x1039f0fe0)
68+
* Task(name='test', id=0x1039f0fe0)
6969
+ Call stack:
7070
| File 't2.py', line 4, in async test()
7171
+ Awaited by:

0 commit comments

Comments
 (0)