no pass-values calling?

Steven D'Aprano steven at REMOVE.THIS.cybersource.com.au
Tue Jan 15 23:36:27 EST 2008


On Wed, 16 Jan 2008 11:09:09 +0800, J. Peng wrote:

> Hello,
> 
> I saw this statement in Core Python Programming book,
> 
> All arguments of function calls are made by reference, meaning that any
> changes to these parameters within the function affect the original
> objects in the calling function.
> 
> 
> Does this mean there is not pass-values calling to a function in python?
> only pass-reference calling? Thanks!

No, Python does not use either pass by reference or pass by value. It 
uses pass by object. (Sometimes called "pass by object reference".)

See: http://effbot.org/zone/call-by-object.htm

for further details.


-- 
Steven



More information about the Python-list mailing list