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

Steven D'Aprano steve at REMOVETHIScyber.com.au
Sat Jan 14 17:51:40 EST 2006


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.

Yes. And this is a problem why? Some values are fixed, and some values are
changeable.

> So I would agree with: objects have values.

I don't believe this is a useful distinction to make.



>> L = [None, 1, "hello"]
>>
>> I have created a name 'L' which is bound to ("has the value of") a list
>> with three items. The first item has the value of ("is the object") None,
>> the second has the value of ("is the object") 1, and the third is the
>> string "hello".
> 
> But if you execute L.append(False) then L is still the same object
> but it's value is different.


Yes. Values can change. So what? 


-- 
Steven.




More information about the Python-list mailing list