On Sat, Oct 31, 2020 at 1:51 PM Jon Ribbens via Python-list <[email protected]> wrote: > > On 2020-10-31, Stefan Ram <[email protected]> wrote: > > Siddhharth Choudhary <[email protected]> writes: > >>I want to know why x+=1 does not return the value of the variable. > > > > Which value? The old or the new one? > > > > Expressions never return values. > > Except when they're assignment expressions, when they do.
Expressions DO have values, but assignment is a statement, not an expression. (Assignment expressions don't have augmented forms, so there's no ambiguity.) ChrisA -- https://mail.python.org/mailman/listinfo/python-list
