1
0
mirror of https://github.com/satwikkansal/wtfpython synced 2024-11-25 12:34:23 +01:00

italic literal *op=*

This commit is contained in:
Beni Cherniavsky-Paskin 2017-09-06 11:30:25 +03:00 committed by GitHub
parent c95ba00160
commit 2155d917df

2
README.md vendored
View File

@ -858,7 +858,7 @@ a += [5, 6, 7, 8]
#### 💡 Explanation:
* `a += b` doesn't always behave the same way as `a = a + b`. Classes *may* implement the op= operators differently, and lists do this.
* `a += b` doesn't always behave the same way as `a = a + b`. Classes *may* implement the *`op=`* operators differently, and lists do this.
* The expression `a = a + [5,6,7,8]` generates a new list and sets `a`'s reference to that new list, leaving `b` unchanged.