ffae48d750
You can now do: X = const(123) Y = const(456 + X) and the compiler will replace X and Y with their values. See discussion in issue #266 and issue #573.
12 lines
116 B
Python
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()
|