Is 'everything' a refrence or isn't it?
donn at drizzle.com
Mon Jan 9 08:40:18 CET 2006
Quoth rurpy at yahoo.com:
| Fredrik Lundh wrote:
| > 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?
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.
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!''
Donn Cave, donn at drizzle.com
More information about the Python-list