passing by refference
Aahz
aahz at pythoncraft.com
Tue May 13 16:01:31 EDT 2003
In article <b9rfpa$n45$1 at ginger.mathworks.com>,
Joshua Marshall <joshway_without_spam at myway.com> wrote:
>
>What you describe is call-by-value. There is an implicit copy of the
>arguments passed to a function, though not a deep-copy. The values
>that are being copied are often references.
Depends whether you consider the arguments to be the binding contained by
a target or the object being passed in by the binding; if the latter,
you're wrong. More than that, you're completely wrong about "often
references"; what gets passed in to a function parameter is *always* a
binding.
Note that I'm using "binding" instead of "reference"; like the mistaken
use of "call-by-value", "reference" has semantics that make sense in
other languages, but not in Python.
--
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
"In many ways, it's a dull language, borrowing solid old concepts from
many other languages & styles: boring syntax, unsurprising semantics,
few automatic coercions, etc etc. But that's one of the things I like
about it." --Tim Peters on Python, 16 Sep 93
More information about the Python-list
mailing list