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

Function clear_frames

Lib/traceback.py:277–285  ·  view source on GitHub ↗

Clear all references to local variables in the frames of a traceback.

(tb)

Source from the content-addressed store, hash-verified

275
276
277def clear_frames(tb):
278 "Clear all references to local variables in the frames of a traceback."
279 while tb is not None:
280 try:
281 tb.tb_frame.clear()
282 except RuntimeError:
283 # Ignore the exception raised if the frame is still executing.
284 pass
285 tb = tb.tb_next
286
287
288class FrameSummary:

Callers

nothing calls this directly

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…