3 ms·
The reality is that almost any interaction with an object can cause it to mutate itself, since Python allows classes to override just about any operator. For ex
by icebraining 11y ago
The reality is that almost any interaction with an object can cause it to mutate itself, since Python allows classes to override just about any operator. For example: "a > 3", "5 in a", "x = a.b", "len(a)", "print a", etc - all of these can cause a to mutate. In the end, you have to trust the code to do the Right Thing, or just not use it.