tests: Rename exec1.py to builtin_exec.py.
This commit is contained in:
6
tests/basics/builtin_exec.py
Normal file
6
tests/basics/builtin_exec.py
Normal file
@@ -0,0 +1,6 @@
|
||||
print(exec("def foo(): return 42"))
|
||||
print(foo())
|
||||
|
||||
d = {}
|
||||
exec("def bar(): return 84", d)
|
||||
print(d["bar"]())
|
||||
Reference in New Issue
Block a user