Finding the instance reference of an object

greg greg at cosc.canterbury.ac.nz
Sat Nov 8 00:31:47 EST 2008


Marc 'BlackJack' Rintsch wrote:

> You have said the value that is copied is a pointer to the object.

This assumes that "call by value" means "call by copying
the value".

That assumption is WRONG.

It doesn't mean that. It means "call by ASSIGNING the
value."

So, you can think of the value of an expression as being
an object, as opposed to a reference to an object, if
you want. But then you need to consider what it means
to assign that value to a name.

Obviously it doesn't mean copying the value -- it must
mean making the name refer to the value somehow.

The same thing happens when the value is passed to a
function.

-- 
Greg



More information about the Python-list mailing list