Nested function scope problem

Gerhard Fiedler gelists at gmail.com
Fri Aug 4 12:42:59 EDT 2006


On 2006-08-04 12:12:44, Antoon Pardon wrote:

>> That's possible. I wouldn't expect too many C programmers to have any
>> notion of "id of a variable". I, for example, never thought about such
>> thing before this thread.
> 
> But even in Python we don't speak of "id of a variable". It is not the
> variable that has an id. It is the object that is currently attached to
> the variable that has an id. Yes we can use "id of a variable" as a
> shortcut for the correct formulation as long as you keep in mind that it
> is not the variable itself that has an id.

This sounds a bit like saying "yes we can use the term 'variable' as a
shortcut for the correct formulation (object associated to a name) as long
as we keep in mind that it is not actually a variable" :)

Gerhard




More information about the Python-list mailing list