Python Args By Reference

S

Steve Holden

Fredrik said:
Grant Edwards wrote:




hopefully not, because that saying that "all arguments are passed
by reference" is extremely confusing for people who've learned about
"call by reference" in school.

as has discussed many times on this list, using "call by object"
(or perhaps "call by object reference" or even "call by sharing")
is better, both for CS heads and for ordinary people.

see e.g.

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

from a thread where someone claimed that Python used "call by value"
(which is true, as long as you're free to use your own definition of the
word "value" ;-)
Or, as one might say, '''"call by value" for some value of "value"'''.

regards
Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,239
Messages
2,571,199
Members
47,835
Latest member
CyrusRuggi

Latest Threads

Top