a = 5
a is not holding the value 5 itself but only an address to the object 5, correct? So it is a reference variable.
b = a
Now it seems to me that b
, instead of again holding the address of a
, is actually holding the "value"
of a, which was the address of the object 5. Isn't this the result of Python being pass-by-value?
But how should I understand this apparent discrepancy?
Thanks!