What is the difference between "call by reference" and "call by value, where the value is a pointer"?

108 views Asked by At

I read this article about Python's variable bindings. It was criticized for teaching errouneous hypotheses. It stated that Python is neither "call by reference" nor "by value".

Someone said in the comments that Python actually follows a clear "call by value" model, where "value" is an object pointer. I do not get the difference between this and calls by reference.

This is not about the difference between "by value" and "by reference", it is about the difference between "by value (object pointer as value)" and "by reference".

Let's say that you hand over a variable by reference. Isn't this reference a value being passed, pointing to a target? Why is it different?

I think that I know what works in Python and what not, but this is somehow an unclear differentiation to me.

Thank you!

0

There are 0 answers