Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ run_code
Method
run_code
Lib/test/test_pkg.py:69–70 ·
view source on GitHub ↗
(self, code)
Source
from the content-addressed store, hash-verified
67
del sys.modules[name]
68
69
def
run_code(self, code):
70
exec(textwrap.dedent(code), globals(), {
"self"
: self})
71
72
def
mkhier(self, descr):
73
root = tempfile.mkdtemp()
Callers
5
test_2
Method · 0.95
test_4
Method · 0.95
test_5
Method · 0.95
test_6
Method · 0.95
define_class
Method · 0.45
Calls
1
dedent
Method · 0.45
Tested by
no test coverage detected