Pass by reference or by value?
Robert Dailey
rcdailey at gmail.com
Fri Jul 13 15:10:32 EDT 2007
More information about the Python-list mailing list
Fri Jul 13 15:10:32 EDT 2007
- Previous message (by thread): Pass by reference or by value?
- Next message (by thread): Pass by reference or by value?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi, I noticed in Python all function parameters seem to be passed by reference. This means that when I modify the value of a variable of a function, the value of the variable externally from the function is also modified. Sometimes I wish to work with "copies", in that when I pass in an integer variable into a function, I want the function to be modifying a COPY, not the reference. Is this possible? Thanks.
- Previous message (by thread): Pass by reference or by value?
- Next message (by thread): Pass by reference or by value?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list