On 2010-02-12 17:30 PM, Antoine Pitrou wrote:
Le Fri, 12 Feb 2010 23:49:38 +0100, Alf P. Steinbach a écrit :

The main reason for not using that term for Python is that "pass by
reference" has the extremely strong connotation of being able to
implement 'swap'.

But 'swap' is so easy to write as a one-line statement that it's foolish
to want to make a Python function for it...

Yes, but that's besides the point. The exercise at hand is to classify the semantic behavior of the function call syntax with respect to its arguments. Being able to implement swap() as a function is a distinguishing feature of the kind of function call semantics that the computer science community has named "call by reference."

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to