circuitpython/tests/bytecode/mp-tests/scope4.py

15 lines
123 B
Python

# test scope
def f(x):
global x42
print(x, x42)
x42 = x
x42 = 123
f(1)
print(x42)
x42 = 456
f(2)
print(x42)