Please help with MemoryError

Robert Kern robert.kern at gmail.com
Fri Feb 12 19:31:15 EST 2010


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




More information about the Python-list mailing list