4 ms·
You're right, it is more like a pointer. In C++, that would call the assignment operator which can do anything it wants, but the address of the Object would no
by civility 8y ago
You're right, it is more like a pointer. In C++, that would call the assignment operator which can do anything it wants, but the address of the Object would not be replaced. Java would change the value of the pointer in the callee.
These cross-language comparisons have too many nuances for me to try and make simple examples. Really, my original point is that CPython does not have "primitive types" as in Java. Everything is passed by pointer to the PyObject.