> Arguments are not passed "by value". They are passed "by reference".
Actually, arguments are just values pointing to objects, and alas, that's not "Pure ByVal" or "Pure ByRef". The most appropriate way to say it is that arguments are passed thru "object reference".
Quoting from GvR Python Tutorial: "arguments are passed using call by value (where the value is always an object reference, not the value of the object) [....] Actually, call by object reference would be a better description, since if a mutable object is passed, the caller will see any changes the callee makes to it (items inserted into a list)."
Submitted by JPVilla (not verified) on Fri, 13/01/2006 - 05:02.
> Arguments are not passed "by value". They are passed "by reference".
Actually, arguments are just values pointing to objects, and alas, that's not "Pure ByVal" or "Pure ByRef". The most appropriate way to say it is that arguments are passed thru "object reference".
Quoting from GvR Python Tutorial: "arguments are passed using call by value (where the value is always an object reference, not the value of the object) [....] Actually, call by object reference would be a better description, since if a mutable object is passed, the caller will see any changes the callee makes to it (items inserted into a list)."
Submitted by JPVilla (not verified) on Fri, 13/01/2006 - 05:02.