Nested function scope problem

Gerhard Fiedler gelists at gmail.com
Thu Jul 27 14:06:11 EDT 2006


On 2006-07-27 13:44:29, Bruno Desthuilliers wrote:

> What bother me with the "hold" term is that I understand it as meaning
> that the name is some kind of container by itself - which it is not.
> Consider the following:
> 
> d = dict()
> d['name'] = 'parrot'
> 
> Would you say that the string "name" 'holds a reference' to the string
> "parrot" ? Obviously not - it's the dict that holds this reference.

Right... I think in some cases it is normal to say in such a situation that
"'name' refers to 'parrot'" (for example when talking about the problem
domain, rather than the implementation) -- independently of the
implementation of the "reference" (which could be a pointer, or a
dictionary, or a database table).

But, I'm a convert already :)

Gerhard




More information about the Python-list mailing list