Message361950
This could sometimes make the output verbose when the arguments themselves are tasks while including arguments in the signature in _format_coroutine.
$ cat /tmp/foo.py
import asyncio
async def foo(a, b): pass
async def main():
task = asyncio.create_task(foo(1, b=1))
task1 = asyncio.create_task(foo(1, b=task))
print(repr(task))
print(repr(task1))
asyncio.run(main())
$ python3.8 /tmp/foo.py
<Task pending name='Task-2' coro=<foo() running at /tmp/foo.py:3>>
<Task pending name='Task-3' coro=<foo() running at /tmp/foo.py:3>>
$ ./python.exe /tmp/foo.py
<Task pending name='Task-2' coro=<foo(a=1, b=1) running at /tmp/foo.py:3>>
<Task pending name='Task-3' coro=<foo(a=1, b=<Task pending name='Task-2' coro=<foo(a=1, b=1) running at /tmp/foo.py:3>>) running at /tmp/foo.py:3>> |
|
Date |
User |
Action |
Args |
2020-02-13 09:03:31 | xtreak | set | recipients:
+ xtreak, asvetlov, yselivanov, stuball123 |
2020-02-13 09:03:31 | xtreak | set | messageid: <1581584611.36.0.520842064597.issue39623@roundup.psfhosted.org> |
2020-02-13 09:03:31 | xtreak | link | issue39623 messages |
2020-02-13 09:03:31 | xtreak | create | |
|