anything like C++ references?

Terry Reedy tjreedy at udel.edu
Sun Jul 13 17:16:08 EDT 2003


"Stephen Horne" <intentionally at blank.co.uk> wrote in message
news:b8c3hvsesjoumiboobml3nsnajtha99mp1 at 4ax.com...
> On Sun, 13 Jul 2003 15:07:23 -0400, "Terry Reedy" <tjreedy at udel.edu>
> wrote:
>
> >How a particular interpreter performs name binding is its own
> >business, as long as the specified semantics are implemented.
>
> You could use the same argument to rationalise a language which used
> the + operator to express subtraction.

Bogus comparison with name binding.  I am not aware that Python does
anything quite so backwards.

> The fact is that 'assignment' has a common meaning separate from the
> choice of programming language, and that the way Python handles name
> binding means that meaning is not respected by Python for mutable
> objects.

>From what others have posted, Python is not the only language in which
'name=object' means "assign 'name' to that object".  This is much
closer to the common idea of object having names than the idea that
names can only name value holders (blocks of linear memory) and not
values or objects themselves.

Terry J. Reedy






More information about the Python-list mailing list