Nested function scope problem
Bruno Desthuilliers
bdesth.quelquechose at free.quelquepart.fr
Thu Jul 27 16:02:07 EDT 2006
Gerhard Fiedler a écrit :
> 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).
Of course. And FWIW, in day to day life, I use the word 'variable' like
anyone else !-)
> But, I'm a convert already :)
>
> Gerhard
>
More information about the Python-list
mailing list