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

Function test

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

Source from the content-addressed store, hash-verified

1def test():
2 a = 13
3 loc = locals()
4 exec('b = a + 1')
5 b = loc['b']
6 print(b) # --> 14
7
8def test1():
9 x = 0

Callers 1

example.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected