Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dabeaz/python-cookbook
/ test4
Function
test4
src/9/executing_code_with_local_side_effects/example.py:30–36 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
28
print(loc)
29
30
def
test4():
31
a = 13
32
loc = {
'a'
: a }
33
glb = { }
34
exec(
'b = a + 1'
, glb, loc)
35
b = loc[
'b'
]
36
print(b)
37
38
if
__name__ ==
'__main__'
:
39
print(
':::: Running test()'
)
Callers
1
example.py
File · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected