4 ms·
Every value in Python is a reference to an object. All function parameters are such values that are passed as they are. You get the same references to objects t
by kzrdude 8y ago
Every value in Python is a reference to an object. All function parameters are such values that are passed as they are. You get the same references to objects that the caller passed.
We could call this "passing references to objects by value."
- zephyrfalcon 8y agoOver the years, I have found this article to be useful: http://effbot.org/zone/call-by-object.htm http://effbot.org/zone/call-by-object.htm
- Izkata 8y agoThat's a long form of what I most often hear: "pass by value of reference" But in any case, that's the point that made me go wtf while reading through as well. Whatever you want to call it, it's the same as what C (when not passing pointers), Java, PHP, Javascript, and many many other languages use. Which is why it's so frustrating we don't have a good, easily-understood/well-known name for it.