Call by binding [was Re: [Tutor] beginning to code]

Antoon Pardon antoon.pardon at vub.be
Mon Sep 25 08:54:27 EDT 2017


Op 25-09-17 om 14:16 schreef Marko Rauhamaa:
> Antoon Pardon <antoon.pardon at vub.be>:
>
>> Op 25-09-17 om 13:32 schreef Marko Rauhamaa:
>>> In Python, assignment "mutates the target" as well. It's only that in
>>> Python, the target is always a pointer.
>> Fine if you want to word it like that, the assignments in Pascal and
>> Python are still sufficiently different.
>>
>> If you do A := B in Pascal, you have two different entities with equal
>> values.
>>
>> If you do A = B in Python, you have one entity that is refered to by
>> two variables/names.
> Python only operates with pointers. You can operate with pointers in
> Pascal as well.

You are talking about implementation details. That under the hood
you can implement it all by manipulating bits in registers and
memory, doesn't contradict that the semantic model is different.

-- 
Antoon Pardon.




More information about the Python-list mailing list