MCPcopy Index your code
hub / github.com/python/cpython / _task_repr_info

Function _task_repr_info

Lib/asyncio/base_tasks.py:9–25  ·  view source on GitHub ↗
(task)

Source from the content-addressed store, hash-verified

7
8
9def _task_repr_info(task):
10 info = base_futures._future_repr_info(task)
11
12 if task.cancelling() and not task.done():
13 # replace status
14 info[0] = 'cancelling'
15
16 info.insert(1, 'name=%r' % task.get_name())
17
18 if task._fut_waiter is not None:
19 info.insert(2, f'wait_for={task._fut_waiter!r}')
20
21 if task._coro:
22 coro = coroutines._format_coroutine(task._coro)
23 info.insert(2, f'coro=<{coro}>')
24
25 return info
26
27
28@reprlib.recursive_repr()

Callers 1

_task_reprFunction · 0.85

Calls 4

cancellingMethod · 0.80
doneMethod · 0.45
insertMethod · 0.45
get_nameMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…