mirror of
https://github.com/licsber/micropython.git
synced 2024-09-21 01:20:23 +08:00
15 lines
123 B
Python
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)
|