Nick Coghlan wrote:

> Python could be said to pass everything by reference. You are getting caught 
> more by the 
> difference between mutable and immutable types, than by the distinction 
> between 'pass by 
> reference' and 'pass by value' that other languages have (Python actually 
> uses a blend of the two 
> ideas - you get references passed in, but it you use assignment on your 
> arguments, the caller is 
> not affected).

to avoid confusing people who (think they) know exactly what "call by value"
and "call by reference" means, the preferred term is "call by object".

for some background, see

 http://mail.python.org/pipermail/python-list/2003-May/163312.html

(in earlier literature, Python's model is often called "call by sharing".  this 
model is
in fact closer to "call by value" than "call by reference", at least if you 
stick to the
usual definitions)

</F> 



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

Reply via email to