11 ms·
The value can be a reference to an object sometimes - that's pretty much it. No, it's always a reference to an object. It's just that some objects are immutabl
by devinj 16y ago
The value can be a reference to an object sometimes - that's pretty much it.
No, it's always a reference to an object. It's just that some objects are immutable and so the distinction is not so clear. Otherwise, all-around agreement. +1
- viraptor 16y agoI wrote "sometimes", because some implementation might JIT the code where a parameter is always an `int` and pass it in unboxed as the value itself (would be allowed due to no mutability). But yes - in "normal" python, it's always a reference.
- devinj 16y agoIn "Python", period. Implementation details don't affect statements about the language!