Add initial version of chapter 11, part 4

This commit is contained in:
Alexander Hess 2020-10-28 16:18:15 +01:00
commit 85b7fd274c
Signed by: alexander
GPG key ID: 344EA5AB10D868E0
9 changed files with 2927 additions and 222 deletions

View file

@ -1577,7 +1577,7 @@
}
},
"source": [
"After this discussion of mutable `Vector` and `Matrix` classes, we continue with immutable classes in the rest of this chapter."
"After this discussion of mutable `Vector` and `Matrix` classes, we continue with immutable implementations in the rest of this chapter. To lower the chance that we accidently design parts of our classes to be mutable, we replace the built-in [list() <img height=\"12\" style=\"display: inline-block\" src=\"../static/link/to_py.png\">](https://docs.python.org/3/library/functions.html#func-list) constructor with [tuple() <img height=\"12\" style=\"display: inline-block\" src=\"../static/link/to_py.png\">](https://docs.python.org/3/library/functions.html#func-tuple) in the `.__init__()` methods. As we learn in [Chapter 7 <img height=\"12\" style=\"display: inline-block\" src=\"../static/link/to_nb.png\">](https://nbviewer.jupyter.org/github/webartifex/intro-to-python/blob/develop/07_sequences/03_content.ipynb#Tuples-are-like-%22Immutable-Lists%22), `tuple`s are like immutable `list`s."
]
},
{