how can I get the name of a variable (or other object)?

Grant Edwards grante at visi.com
Thu Jul 22 13:52:53 EDT 2004


On 2004-07-22, JCM <joshway_without_spam at myway.com> wrote:
> Grant Edwards <grante at visi.com> wrote:
> ...
>>> The Python documentation talks about variables.  Personally I
>>> think that's a fine name for the scoped binding between an
>>> identifier and a value.
>
>> But it's not a binding between an identifier and a value.  It's
>> a binding between an identifier and an _object_.  For immutable
>> objects, it's a moot point, but for mutable objects, there are
>> some real-world programming consequences.
>
> I consider the values to be references to objects.  But as you say...

Exactly.  As long as variables' values are always talked about
as "pointers to objects" or "references to ojbects", then the
term 'variable' has the traditional meaning.

-- 
Grant Edwards                   grante             Yow!  I request a weekend
                                  at               in Havana with Phil
                               visi.com            Silvers!



More information about the Python-list mailing list