Finding the instance reference of an object

Dale Roberts gooberts at gmail.com
Fri Oct 31 10:35:19 EDT 2008


On Oct 31, 2:27 am, greg <g... at cosc.canterbury.ac.nz> wrote:
> Dale Roberts wrote:
> > Are you
> > saying that C++ is capable of using the Call By Reference idiom, but C
> > is not, because C does not have a reference designation for formal
> > function parameters?
>
> Call by reference is not an "idiom", it's a *language
> feature*.
> ...
> You can use an idiom in C to get the same effect, but this
> is not the same thing as the language having it as a feature.

Okay, I'll grant that, but is there a language other than Python that
uses the Call By Value feature that does not do it by assigning/
copying the result of an expression into the formal parameter?

The terms "result" and "value" are generally understood to refer to
the working data of the program, not the internal workings of the
interpreter, VM, or compiler.

So, yes, internally the C Python runtime does use Call By Value. It's
written in C after all - that's all it can do.

But Call By Value is not a feature of the Python language.

dale

[Somebody unplug my network cable! I can't stop!]



More information about the Python-list mailing list