coding style - where to declare variables

Richard Damon Richard at
Sun Jul 22 16:16:37 EDT 2018

> On Jul 22, 2018, at 3:50 PM, Marko Rauhamaa <marko at> wrote:
> I wish people stopped talking about "name binding" and "rebinding,"
> which are simply posh synonyms for variable assignment. Properly, the
> term "binding" comes from lambda calculus, whose semantics is defined
> using "bound" and "free" variables. Lambda calculus doesn't have
> assignment.
> More about variable binding here: <URL:
> Marko

Marko, I think the term binding makes sense in python due to how names work.
In python and the following code:

X = getit()
Y = X

In python, presuming getit() returns some form of object (so it has a changeit() member) then X and Y are bound to the same object, and changeit() will thus also affect the object that we see at Y.
With a language with more ‘classical’ variable, the assignment of Y = X would normal make a copy of that object, so the value Y does not get changed by X.changeit().

More information about the Python-list mailing list