In article <[EMAIL PROTECTED]>, Fredrik Lundh <[EMAIL PROTECTED]> wrote: >> and the Python use is consistent with the rest of computer science. > >The problem isn't the word "reference" in itself, the problem is when people >are implying that "since Python passes object references to functions, it's >using call by reference".
Actually, I think the problem is not in the "call" bit. Python behaves more or less like all other call by reference languages in the call. What is confusing people is what happens when you *assign* to a function argument. Those confused are expecting Python function arguments to behave just like C++ references (which are just syntactic sugar for a dereferenced pointer) or an Ada "in out" parameter when assigned. Python doesn't, because in Python assignment assigns a new reference to the name, rather than changing the referenced object. /Anders -- -- Of course I'm crazy, but that doesn't mean I'm wrong. Anders Hammarquist | [EMAIL PROTECTED] Physics student, Chalmers University of Technology, | Hem: +46 31 88 48 50 G|teborg, Sweden. RADIO: SM6XMM and N2JGL | Mob: +46 707 27 86 87 -- http://mail.python.org/mailman/listinfo/python-list