The meaning of a = b in object oriented languages

Terry Reedy tjreedy at udel.edu
Tue Sep 18 19:27:58 EDT 2007


"Summercool" <Summercoolness at gmail.com> wrote in message 
news:1190094057.976729.285120__39064.8685548969$1190094417$gmane$org at n39g2000hsh.googlegroups.com...

In Python, names are names.  They get associated with or bound to objects.

b=<expression>

means associate name b with the object resulting from evaulating the 
expression.  So

b = a

means associate b with the object 'currently' bound to a.

Your discussion of pointers, bytes, and integer-addressed memory locations 
is correct as to the CPython implementation of Python.  But these are not 
part of the semantics of Python itself as an algorithm language.  Unlike 
with C, we humans can read, understand, and execute Python code without 
mentally simulating a linear-memory computer.  That is part of what makes 
it easier to read.

Terry Jan Reedy






More information about the Python-list mailing list