passing by refference

Greg Ewing (using news.cis.dfn.de) g2h5dqi002 at sneakemail.com
Tue May 20 21:22:30 EDT 2003


Tim Peters wrote:
> The notion of object identity is also important.  The call-by-object
> business explicitly addresses all of them (read Liskov or Baker, previously
> referenced).  By itself, "call by value" doesn't;

What would y'all think of the following way of phrasing
it:

    Python passes references to objects by value.

It seems to me that the concept of passing something by
value, as opposed to passing it by reference, applies
perfectly well to Python. We just need a way of referring
to the concept while making it clear *what* it is that's
being passed. I think the above phrasing achieves that.
Does anyone agree?

P.S. I make no apology for using the word "reference"
either, since I'm also stating what the reference is
referring to. I don't understand why there is so much
opposition to using this word when talking about Python.
I maintain that, to correctly understand Python's data
model, you need some concept in your brain that's
functionally equivalent to a reference -- so why not
call it that?

-- 
Greg Ewing, Computer Science Dept,
University of Canterbury,	
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg





More information about the Python-list mailing list