Product Site

1.13.1. Extended Assignments

The character sequences +=, -=, *=, /=, %=, //=, ||=, &=, |=, &&=, and **= can be used to create extended assignment instructions. An extended assignment combines a non-prefix operator with an assignment where the term on the left side of the assignment is also used as the left term of the operator. For example,
    a += 1

is exactly equivalent to the instruction
    a = a + 1

Extended assignments are processed identically to the longer form of the instruction.