|
|
|
|
|
by mattdawson
6032 days ago
|
|
Python, for one, doesn't help to make the matter any clearer. In fact, Python makes it look like pass-by-reference is used, even when it isn't. For a better explanation than I could ever come up with:
http://stackoverflow.com/questions/986006/python-how-do-i-pa... Just to play devil's advocate: if it looks like a duck and quacks like a duck, why would I call it anything other than "duck"? It may be technically correct to say that (in Python, at least) everything is passed by value. But if it helps someone remember that lists may be altered when passed to a function and that tuples can't, what's the real harm? Again: devil's advocate. |
|
The Effbot suggest we call Python call semantics for 'call-by-object-reference' http://effbot.org/zone/call-by-object.htm which makes it a lot clearer.