passing by refference

Tim Peters tim.one at comcast.net
Thu May 15 20:28:37 EDT 2003


[Joshua Marshall]
>>> I consider Python values themselves to be object references

[Fredrik Lundh]
>> if you keep inventing your own terminology, you'll never win this
>> argument:

[Joshua Marshall]
> I've quoted it elsewhere in the thread, but I'll do it again here.
> ...
> Is "object reference" the term you claim I made up?

I don't think so, he was pointing at the Python manual's "Objects, values
and types" section, and the objection is to using a strained (non-Python)
meaning for "value".  The referenced section makes clear that, in Python, an
object's value and an object's identity are distinct concepts.  Python never
passes values -- not as Python uses the word "value".  It always pass object
identities.  You can call object identities values if it helps your mental
model, but doing so in public <wink> only confuses the issues for people
using Python's native terminology.

> The documentation is a little schizophrenic about "objects" versus
> "object references", but this isn't a problem, since Python has no
> dereferencing operator.

Right on target.






More information about the Python-list mailing list