associativity

listen to the pronunciation of associativity
İngilizce - Türkçe
birleşirlik
birlesirlik
İngilizce - İngilizce
the condition of being associative
Determines whether you do the left operator first or the right operator first when you have "A operator B operator C" and the two operators are of the same precedence Operators like + are left associative, while operators like ** are right associative See Chapter 3, "Unary and Binary Operators", for a list of operators and their associativity
The associativity of a binary operator determines the order in which several of them in a row are done If the operator is left-associative (or, equivalently, if it associates to the left) then that operator is applied from left to right If it is right-associative (or, equivalently, it associates to the right) then that operator is applied from right to left For example, - is left-associative So 10 - 4 - 3 is computed from left to right First, 10 - 4 is computed, yielding 6 Then 6 - 3 is computed, yielding 3 If you insert parentheses to force this, you get (10 - 4) - 3 As you can see, the parentheses are toward the left On the other hand, ^ is right associative (^ is exponentiation) So 3^3^2 yields the same result as 3^9, not as 27^2 See E7
close window
{i} association, coalition; associative behavior
Determines whether you do the left operator first or the right operator first, when you have "A operator B operator C", if the two operators are of the same precedence Operators like + are left associative, while operators like ** are right associative See the section "Operators" in Chapter 2, The Gory Details, for a list of associativity
Characteristic of functions that can be grouped or associated without changing their value, for example
A property in math which states that: (A+B)+C=A+(B+C) and (A*B)*C=A*(B*C)