Is 'everything' a refrence or isn't it?

rurpy at rurpy at
Mon Jan 9 21:04:12 EST 2006

"Donn Cave" <donn at> wrote in message
news:1136792417.696119 at
> Quoth rurpy at
> | Fredrik Lundh wrote:
> | ...snip...
> | > afaik, the Python Language Reference never defines the word "reference".
> | > It carefully defines words like "object" and "value", though, and terms like
> | > "call by object" or "call by object reference" are perfectly understandable
> | > if you use the words as they are defined in the language reference.
> |
> | It (sec. 3.1, "Objects, values and types") is not what I would
> | call a good definition .  About values it says only
> |
> | - that they are something that all objects have.
> | - they can be mutable or immutable.
> |
> | It then has a few sentences about mutability, so after reading
> | it you will know that, whatever a value is, it can be changed
> | for some objects but not others.  But what exactly it is that is
> | being changed is still a mystery.
> | Further down it talks about container objects "containing"
> | references to other objects and of those being part of it's
> | value.  Part?  What does it mean to contain?  Can one
> | determine from reading this, if an attribute value is part
> | of the object's value?  (I couldn't).
> |
> | On my list on Python Doc problems that need fixing, is
> | "defintion of object values" and it has been on there
> | for nearly a year.
> So you've had time to think about how you would define value, in a
> few words.  Any ideas?

Not yet.  The reason is that I am still trying to figure out
what a value is myself.  Do all objects have values?  If
not which do and which don't?  What's the value of int(1)?
An object?  Some otherwise unreachable thing that
represents the abstract concept of the number 1?
What the value of object()?  A few weeks ago I turned
to that page for enlightenment, with the results I reported.

> I find the topic difficult, myself.  I think you really have to apply
> some context to the question, so there may not be any satisfactory
> definition for the language reference.

I have a hard time accepting that.  I do not think there
is any aspect of human thought that cannot be described
by a sufficiently skilled writer.

> But maybe it would be simple with the right focus.  If we could somehow
> define value, how would that help?  I mean, presumably we need to
> understand all this stuff because we want to write some software, and
> if we dive in without understanding, our attempts will be plagued with
> conceptual errors.  Is there something about value in particular that
> seems to be a problem here?  ``No, you idiot, that's not a value -
> THIS is a value!''

Yes, see above.  How can you feel confident working with
things that aren't understood?  (c.f. this thead about
problems resulting from python beginner's misconceptions
about references.)

More information about the Python-list mailing list