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

Function extract

Lib/_py_warnings.py:899–902  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

897 if coro.cr_origin is not None:
898 import linecache, traceback
899 def extract():
900 for filename, lineno, funcname in reversed(coro.cr_origin):
901 line = linecache.getline(filename, lineno)
902 yield (filename, lineno, funcname, line)
903 msg_lines.append("Coroutine created at (most recent call last)\n")
904 msg_lines += traceback.format_list(list(extract()))
905 msg = "".join(msg_lines).rstrip("\n")

Callers 5

test_extract_stackMethod · 0.85
test_extract_tbMethod · 0.85
test_format_exceptionMethod · 0.85
test_extract_stackMethod · 0.85

Calls 1

getlineMethod · 0.45

Tested by 4

test_extract_stackMethod · 0.68
test_extract_tbMethod · 0.68
test_format_exceptionMethod · 0.68
test_extract_stackMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…