Steven D'Aprano <[EMAIL PROTECTED]> writes: > On Sun, 15 Jan 2006 03:11:27 -0500, Mike Meyer wrote: >> Steven D'Aprano <[EMAIL PROTECTED]> writes: >>> On Sat, 14 Jan 2006 23:26:40 -0500, Mike Meyer wrote: >>>>> I have no problem with that. Some objects are mutable and can change >>>>> their value >>>> If the object *is* the value, how can it change to be a different value >>>> without also changing to be a diffent object? >>> Because that's what they do. >>> Think of it this way: objects are the memory location, the value is the >>> particular pattern of bits at that memory location. Just because you flip >>> a couple of bits at location N, changing the value, the location doesn't >>> change. >> Ok. So when you say "the object is the value", you're *really* saying >> "the memory location is the pattern of bits it holds." > No. You seem to have trouble with analogies. My apologies for not making > it clearer: I should have said, by analogy, the relationship between > mutable objects and their value is equivalent to the relationship between > a memory location and the bit pattern at that location.
No, I don't have any trouble with analogies. I'm just carrying it to make the point that *I* want to make, rather than stopping at the point that you want to make. > It isn't common for programming data to have multiple values > simultaneously, but it does happen: a certain value can be a pointer to a > memory location and an integer, or a numeric value and a character. Yup, and they're all represented by the same bit pattern. I've got no problem with that. It's perfectly correct to say that that bit pattern *is* all those things. On the other hand, it's not correct so say that the memory location - or the object - that those bit patterns reside in *is* those those. It isn't - it just holds them. <mike -- Mike Meyer <[EMAIL PROTECTED]> http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python-list