4 ms·
> Python added "x+=1" ... (relatively) recently Not all that recently anymore – it was added 20 years ago in Python 2.0: https://docs.python.org/2/whatsnew/2.0
by ptx 6y ago
> Python added "x+=1" ... (relatively) recently
Not all that recently anymore – it was added 20 years ago in Python 2.0:
https://docs.python.org/2/whatsnew/2.0.html#augmented-assignment https://docs.python.org/2/whatsnew/2.0.html#augmented-assign...
But the walrus operator, "x := x + 1", was added very recently:
https://docs.python.org/3/whatsnew/3.8.html#assignment-expressions https://docs.python.org/3/whatsnew/3.8.html#assignment-expre...