var or inout parm?

Joe Strout joe at
Thu Dec 11 00:55:06 CET 2008

On Dec 10, 2008, at 4:29 PM, J. Clifford Dyer wrote:

>>>> mh at wrote:
>>>>> How can I make a "var" parm, where the called function can modify
>>>>> the value of the parameter in the caller?
>> See Also: the earlier heated debate thread over what evaluation
>> strategy Python uses (Survey says!: call-by-object).
> Oh dear God.  PLEASE don't see also that thread.  That way lies  
> madness.
> Just google for call-by-object, and ignore the hell out of that  
> thread.

Agreed on that point!

Anyway, to the OP, see <> for  
a detailed explanation of why you can't do quite what you're asking  
for in Python (or Java, for that matter).

- Joe

More information about the Python-list mailing list