소스 검색

Merge pull request #26 from K-Guan/patch-2

Fixed the incorrect part in "Associativity"
Swaroop C H 9 년 전
부모
커밋
bbdeee5bae
1개의 변경된 파일12개의 추가작업 그리고 3개의 파일을 삭제
  1. 12 3
      op_exp.asciidoc

+ 12 - 3
op_exp.asciidoc

@@ -227,9 +227,18 @@ expression, then you can write something like `(2 + 3) * 4`.
 === Associativity
 === Associativity
 
 
 Operators are usually associated from left to right. This means that operators with the same
 Operators are usually associated from left to right. This means that operators with the same
-precedence are evaluated in a left to right manner. For example, `2 + 3 + 4` is evaluated as `(2 +
-3) + 4`. Some operators like assignment operators have right to left associativity i.e. `a = b = c`
-is treated as `a = (b = c)`.
+precedence are evaluated in a left to right manner. For example, `2 + 3 + 4` is evaluated as `(2 + 3) + 4`. 
+
+Assignment operators are the same. For example, `a = b = c` is treated as: 
+
+[source,python]
+--------------------------------------------------
+temp = c
+a = temp
+b = temp
+--------------------------------------------------
+
+In this case `temp` is a temporary variable, actually it does not exist, or we can say it will be deleted then.
 
 
 === Expressions
 === Expressions