I’ll keep this simple. Consider the following.
a = 1 b = 1 c = a + b print(c) # prints 2 a = 2 print(c) # still prints 2, because that's how variables work
Is there something that looks clean, doesn’t waste RAM, and works like the following?
a = 1 b = 1 alias c = a + b print(c) # prints 2 a = 2 print(c) # prints 3
a = 1 b = 1 with a + b as c: print(c) # prints 2 a = 2 print(c) # prints 3
In other words, can you alias something like
a + b?
I am aware that, aside from readability, this is useless, but readability counts!
I also tried the example with
with, but got