Derek Martin <[EMAIL PROTECTED]> writes: > On Thu, Nov 13, 2008 at 11:58:18AM -0800, [EMAIL PROTECTED] wrote: >> I have yet to see any reasonable definition of a Python value in the >> Python docs or elsewhere, despite the fact that a value is one of >> the three defining characteristics of an object, a central concept >> in Python. > > Why does it need to be defined in the Python docs? Is this really > even an important question to answer? Are you unable to write correct > functional programs in Python without having it answered? I suspect > it's not an issue... > > Let's assume for the moment that it is, though. The term "value" > already has a meaning... the one ascribed to it by its use in natural > language. One on-line dictionary includes this among its definitions: > > magnitude; quantity; number represented by a figure, symbol, or the > like: the value of an angle; the value of x; the value of a sum. > > It seems clear that this, or something extremely close to this, is > what is meant in the Python docs by the unqualified use of the term.
I reiterate that IMO the 'value' of an object is not really a useful concept. E.g. think of the integer 3. It has a representation ('3'), it compares to other objects (via int.__eq__, int.__lt__, etc), you can perform arithmetic operations on it (via int.__add__, int.__sub__, etc), etc. What more would you want to know about it? [...] > If you like, you could think of the value of an object as the set of > all possible values to which the object may evaluate in every possible > context, given a particular state of the object. This definition looks a bit circular to me ;) -- Arnaud -- http://mail.python.org/mailman/listinfo/python-list