On Sun, Nov 16, 2008 at 08:38:25AM +0000, Steven D'Aprano wrote: > I believe that the language reference says that objects have an identity, > a type and state, but I'm too lazy too look it up. I'd be happy with that > definition.
They do indeed say value, not state. As I said in a different message, I'd agree that it's not a very clear definition. > > I don't see how saying "the value of an object is itself" is > > particularly useful. We already have a word for what an object is, it > > is "object". :-) > > I didn't say it was very useful. As far as I'm concerned, asking what the > value of an object is is not a useful question. Now we agree. :) > > The result of x==y depends solely on the behavior (methods) of x. > > Nonsense. It's wrong to say *solely*, but the value of x==y does indeed depend on the behavior of the methods. > I think the value of x is "a thing which claims to be equal to > everything on Tuesdays, and equal to nothing every other day". That isn't its *VALUE* -- it's its *IDENTITY*. My weight is not my identity... but in a certain context, it could be considered my value. -- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0x81CFE75D
pgpVW1VzHngyK.pgp
Description: PGP signature
-- http://mail.python.org/mailman/listinfo/python-list