Nested function scope problem

Gerhard Fiedler gelists at gmail.com
Sat Jul 29 14:36:37 EDT 2006


On 2006-07-29 13:47:37, Antoon Pardon wrote:

> I think the important thing to remember is that the assignment in Python
> is a alias maker and not a copy maker. In languages like C, Fortran,
> pascal, the assignment makes a copy from what is on the righthand and
> stores that in the variable on the lefthand. In languages like Lisp,
> Smalltalk and Python, the assignment essentially makes the lefthand
> an alias for the righthand.

Yes, I think I got it now :) 

It seems that, in essence, Bruno is right in that Python doesn't really
have variables. Everything that seems variable doesn't really change; what
changes is that an element of what seems to change gets rebound. Which in
itself is a rebinding process of a dictionary... I have yet to go there and
see whether anything at all changes :) 

Gerhard




More information about the Python-list mailing list