4 ms·
Storically, python devs says the python language use "pass-by-name"
by _ZeD_ 12y ago
Storically, python devs says the python language use "pass-by-name"
- icebraining 12y agoHow so? Reading [1] on pass-by-name, I don't see how it applies to Python, which evaluates the function arguments before passing them. The example given would be, in Python, def double(x): x *= 2 a = [4] double(a[0]) If Python was pass-by-name, a would now be [8], but it's actually still [4]. [1] http://www.cs.sfu.ca/~cameron/Teaching/383/PassByName.html http://www.cs.sfu.ca/~cameron/Teaching/383/PassByName.html