By value or by reference?

JCM joshway_without_spam at myway.com
Mon Oct 18 12:30:57 EDT 2004


Jorge Godoy <godoy at ieee.org> wrote:
> "Riccardo Rossi" <riccardo.rorssi76 at email.it> writes:

>> Hi all!
>>
>> How does Python pass arguments to a function? By value or by reference?

> IIRC, by reference.  It uses a copy on write algorithm. 

Copy-on-write is an optimization.  It doesn't affect the semantics of
the laguage.



More information about the Python-list mailing list