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

Function reset_code

Lib/test/support/__init__.py:1463–1466  ·  view source on GitHub ↗

Clear all specializations, local instrumentation, and JIT code for the given function.

(f: types.FunctionType)

Source from the content-addressed store, hash-verified

1461
1462
1463def reset_code(f: types.FunctionType) -> types.FunctionType:
1464 """Clear all specializations, local instrumentation, and JIT code for the given function."""
1465 f.__code__ = f.__code__.replace()
1466 return f
1467
1468on_github_actions = "GITHUB_ACTIONS" in os.environ
1469

Callers 3

get_cached_valuesMethod · 0.90
clear_executorsFunction · 0.90

Calls 1

replaceMethod · 0.45

Tested by 3

get_cached_valuesMethod · 0.72
clear_executorsFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…