Assignment versus binding

dieter dieter at handshake.de
Wed Oct 5 03:31:18 EDT 2016


Rustom Mody <rustompmody at gmail.com> writes:

> On Tuesday, October 4, 2016 at 12:47:58 PM UTC+5:30, dieter wrote:
> ...
>> On the other hand, one can model Python variables as bindings
>> where language constructs (assignments) allow to change the binding.
>> 
>> Thus, at an appropriate level of abstraction, you can say that
>> "binding" and "assignment" are mostly equivalent.
>
> Thats a bizarre statement -- Are not the contents of the scope and the shape of the scope different things?

An interesting view.

Apparently, you identify "binding" and "scope" (or more precisely its shape).
And in this view, the binding is changed by language construct introducing
"variables".

My view is a bit different. I identify "binding" with the map
from variables to values, i.e. the environment in which expressions
are evaluated. This is more the "scope's content".

I am not sure which view is more correct.




More information about the Python-list mailing list