Nested function scope problem

Gerhard Fiedler gelists at gmail.com
Tue Jul 25 15:49:20 EDT 2006


On 2006-07-25 13:33:40, Dennis Lee Bieber wrote:

>> Surprising for me are actually two things: 1- the fact itself, and 2- that
>> term "binding", and that whatever it means (I'll have to read more on that,
>> now that I know the term) is different for read-only and read/write access.
>>
> Binding only happens when the bare name is on the LHS of an assignment
> (or, to complicate matters, passed as an argument). 

This makes a lot more sense now.


> Binding has nothing to do with "read-only" vs "read/write" access.

Isn't being on the LHS the only way to write to a non-mutable object? Are
there situations where binding happens without writing to a variable? Are
there write accesses to non-mutable objects where the name is not on the
LHS?


> Reading is a look-up operation -- you are looking for the object that
> "currently" has the "post-it" (which is the Name) attached to it.

Thanks, to you and Bruno. I think I got this now, and also why. 

(And see, here you are talking about reading... see my questions above.)

Gerhard




More information about the Python-list mailing list