"always passes by reference"

Tim Peters tim_one at email.msn.com
Thu Jul 27 02:24:25 EDT 2000


[Tim, quoted out of context]
> Anyone thinking about references under the covers is just confusing
> their mental picture -- only the implementers have to worry about
> that, and even then rarely.

[Greg Ewing]
> How can you have a correct mental picture of the Python
> data model that doesn't contain anything corresponding
> to a reference?

In context, the paragraph was talking about Python's parameter-passing
mechanism, which is not (as you agreed in your own reply!) what "call by
reference" suggests to people, and particularly not to the person who
brought it up.  That's the sense and the context in which thinking about
references under the covers is just confusing.  You called Python's
mechanism "call by spanish inquistion"; I called it "call by object".

> Whether you call it that or not, there has to be something
> in the model that is not-the-object but somehow identifies-
> the-object, so that the object can appear in more than one
> place at a time without having multiple copies of it.

Oh, Greg -- that's so either/or.  Didn't you know that Python is the first
truly post-modern quantum language <wink>?

an-object-is-in-all-places-simultaneously-ly y'rs  - tim






More information about the Python-list mailing list