circuitpython/tests/micropython/const.py

12 lines
116 B
Python

# test constant optimisation
X = const(123)
Y = const(X + 456)
print(X, Y + 1)
def f():
print(X, Y + 1)
f()