2 ms·
> Nobody in the real world expects this behaviour. For example, numbers and strings are immutable objects in Python. If self.x is a number and its numeric valu
by fulafel 7mo ago
> Nobody in the real world expects this behaviour.
For example, numbers and strings are immutable objects in Python. If self.x is a number and its numeric value is changed by a method call, self.x will be a different object after that. I'd dare say people expect this to work.