MCPcopy Index your code
hub / github.com/RustPython/RustPython / reset_code

Function reset_code

Lib/test/support/__init__.py:1390–1393  ·  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

1388
1389
1390def reset_code(f: types.FunctionType) -> types.FunctionType:
1391 """Clear all specializations, local instrumentation, and JIT code for the given function."""
1392 f.__code__ = f.__code__.replace()
1393 return f
1394
1395on_github_actions = "GITHUB_ACTIONS" in os.environ
1396

Callers 1

get_cached_valuesMethod · 0.90

Calls 1

replaceMethod · 0.45

Tested by 1

get_cached_valuesMethod · 0.72