MCPcopy Create free account
hub / github.com/dabeaz/python-cookbook / test3

Function test3

src/9/executing_code_with_local_side_effects/example.py:21–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19 print('x =', x)
20
21def test3():
22 x = 0
23 loc = locals()
24 print(loc)
25 exec('x += 1')
26 print(loc)
27 locals()
28 print(loc)
29
30def test4():
31 a = 13

Callers 1

example.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected