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

Function to_list

Lib/test/test_asyncgen.py:44–51  ·  view source on GitHub ↗
(gen)

Source from the content-addressed store, hash-verified

42
43
44def to_list(gen):
45 async def iterate():
46 res = []
47 async for i in gen:
48 res.append(i)
49 return res
50
51 return run_until_complete(iterate())
52
53
54def py_anext(iterator, default=_no_default):

Calls 2

run_until_completeFunction · 0.85
iterateFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…