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

Mike Meyer mwm at mired.org
Sat Jan 14 18:26:41 EST 2006


Steven D'Aprano <steve at REMOVETHIScyber.com.au> writes:
> On Sat, 14 Jan 2006 14:14:01 +0000, Antoon Pardon wrote:
>> On 2006-01-14, Steven D'Aprano <steve at REMOVETHIScyber.com.au> wrote:
>>> On Thu, 12 Jan 2006 16:11:53 -0800, rurpy wrote:
>>>> It would help if you or someone would answer these
>>>> five questions (with something more than "yes" or "no" :-)
>>>> 1. Do all objects have values?
>>> All objects ARE values. Some values themselves are complex objects
>>> which in turn contain other values, e.g. if I execute:
>> I don't agree with this wording. If a mutable object mutates it
>> is still the same object but is's value has changed.
[...]
>> So I would agree with: objects have values.
> I don't believe this is a useful distinction to make.

If two objects ARE the same value, then they should be the same
object. If two objects HAVE the same value, then they may or may not
be the same object. In particular, if the value is mutable, and you
change one object that is some value you change the value, but the any
other objects that are that value are still the old value of the value
(um, I hope you know what I mena).

This problem - and the vocabulary problem I just illustrated - both go
away if objects have values instead of are values.

     <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