A question on modification of a list via a function invocation
Steve D'Aprano
steve+python at pearwood.info
Mon Sep 4 14:15:26 EDT 2017
On Tue, 5 Sep 2017 02:51 am, Stefan Ram wrote:
> Steve D'Aprano <steve+python at pearwood.info> writes:
>>Sorry Stefan, that is the same trap that many others fall into. You are
>>assuming that there are exactly two evaluation conventions:
>>- pass by reference
>>- pass by value
>>and so if a language doesn't do one, it must do the other.
>
> I am assuming that there are two argument passing mechanismss
> in the languages mentioned by me (C, C++, VBA, C#, Java,
> JavaScript, and Python):
>
> - pass by aliassing (reference)
> - pass "as if by assignment"
That assumption is wrong.
--
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.
More information about the Python-list
mailing list