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

Mike Meyer mwm at mired.org
Sun Jan 15 09:11:27 CET 2006


Steven D'Aprano <steve at REMOVETHIScyber.com.au> 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." Except that a
memory location is an address, which is a pattern of bits.  In
general, this won't be the same pattern of bits as the memory location
holds. So you're actually claiming that an object is two different
patterns of bits at the same time.

         <mike
-- 
Mike Meyer <mwm at mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.



More information about the Python-list mailing list