What other languages use the same data model as Python?

Roy Smith roy at panix.com
Thu May 5 10:31:33 EDT 2011


In article <ipubhb$e4q$2 at reader1.panix.com>,
 Grant Edwards <invalid at invalid.invalid> wrote:

> That's what I was trying to say, but probably not as clearly.  The "&"
> operatore returnas a _value_ that the OP passes _by_value_ to a
> function.  That function then uses the "*" operator to use that value
> to access some data.

Then, of course, there's references in C++.  I think it's fair to call 
the following "call by reference" in the sense we're talking about it 
here.

void f(int& i) {
   i = 5;
}
int i = 42;
f(i);

Of course, C++ lets you go off the deep end with abominations like 
references to pointers.  Come to think of it, C++ let's you go off the 
deep end in so many ways...



More information about the Python-list mailing list