Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the name of this operator "+=" ?

What's the name of this operator "+=" ?

like image 900
H4cKL0rD Avatar asked Jan 21 '10 06:01

H4cKL0rD


People also ask

What is the name of this operator +=?

The addition assignment operator ( += ) adds the value of the right operand to a variable and assigns the result to the variable. The types of the two operands determine the behavior of the addition assignment operator.


1 Answers

It, along with -=, *=, etc., are called the augmented assignment operators in Python, and "compound assignment" operators everywhere else.

like image 81
Ignacio Vazquez-Abrams Avatar answered Sep 21 '22 15:09

Ignacio Vazquez-Abrams