In the Wrapping Up section, there are some very interesting points that weren't covered in the article.<p><pre><code> - Why is "list += seq" not the same as "list = list + seq"?
- Why is "is" different than "==" and how come "2 + 2 is 4", but "1000 + 1 is not 1001"?
- What's the deal with mutable default arguments to functions?
- Why is it easy to make a list class attribute, but hard to make an int class attribute?
</code></pre>
I'd love to read an article on these topics. Anyone have links?
Ned always has fantastic articles, and the way this is lays out the mutable values name relationship, is it just lazy programming that has multiple names pointing to the same mutable value(s) or are their specific cases when that would make since to have list(a) list(b) point to the same value(s)?
Personally, THIS is what an "intro to language X" article should look like. It walks you through how the language thinks, which is one of the things you need to learn in order to understand how to best use it and why things are the way they are.