4 ms·
- how does the language know a thing is (not) mutable? - how does it know you're not doing that on purpose?
by yedpodtrzitko 7y ago
- how does the language know a thing is (not) mutable?
- how does it know you're not doing that on purpose?
- dnautics 7y ago1) aren't there specific immutable pass-by-value forms in python? If you pass a default integer, for example, and change the value of that variable in the function body, the next call will respect the default parameter and not the mutated parameter. 2) good point.