2 ms·
Er, it doesn't? `.get()` (or `[]` in the original) doesn't change the object, and `obj =` only changes which object the local variable refers to? This isn't li
by o11c 3y ago
Er, it doesn't? `.get()` (or `[]` in the original) doesn't change the object, and `obj =` only changes which object the local variable refers to?
This isn't like C++ with its intrusive `=`.
- ddejohn 3y agoYou're right. Python is pass by reference and it's the reference being changed, not the object. This is what happens when you read code on the internet after drinks.