Skip to content

Commit 19e6b7d

Browse files
authored
Merge pull request satwikkansal#221 from cl0ne/patch-1
Add link to Python FAQ to "Mutating the immutable"
2 parents 7d06e7b + be2d537 commit 19e6b7d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1701,6 +1701,7 @@ But I thought tuples were immutable...
17011701
An object of an immutable sequence type cannot change once it is created. (If the object contains references to other objects, these other objects may be mutable and may be modified; however, the collection of objects directly referenced by an immutable object cannot change.)
17021702
17031703
* `+=` operator changes the list in-place. The item assignment doesn't work, but when the exception occurs, the item has already been changed in place.
1704+
* There's also an explanation in [official Python FAQ](https://docs.python.org/3/faq/programming.html#why-does-a-tuple-i-item-raise-an-exception-when-the-addition-works).
17041705
17051706
---
17061707

0 commit comments

Comments
 (0)