Aliasing [was Re: [Tutor] beginning to code]
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Wed Sep 27 03:38:52 EDT 2017
On Wed, 27 Sep 2017 08:56:03 +0200, Antoon Pardon wrote:
>> But that's not enough for the variable b to be an alias for the
>> variable a.
>
> Yes it is!
Since you seem to be intent on inventing your own meanings for well
established words, for the confusion and misinformation of all, I can
only follow in your footsteps and say:
"You are a fine fellow and your arguments make perfect sense."
Make if that what you will.
Antoon, there is no point in continuing this argument. You're entitled to
your own opinions, but not your own facts, so when you insist:
> No, the model that C++ and Pascal use is not different in this aspect.
that Pascal var parameters and C++ reference variables operate the same
way as Python variable assignment, the *kindest* thing I can say is that
you are ignorant.
Python does not have anything like C++ references and Pascal var
parameters, which is why you will never be able to write a swap()
function that operates like the classic Pascal swap procedure used as the
definitive test for pass-by-reference.
Twice you have claimed to be able to write such a swap procedure for
lists. You can't. If you think you can, it is only because you have
misunderstood the problem and are writing something else that does
something different from what the Pascal version does.
--
Steven D'Aprano
“You are deluded if you think software engineers who can't write
operating systems or applications without security holes, can write
virtualization layers without security holes.” —Theo de Raadt
More information about the Python-list
mailing list