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

Bryan Olson fakeaddress at nowhere.org
Fri Jan 13 05:11:40 EST 2006


Mike Meyer wrote:
> Bryan Olson writes:
> 
>>rurpy at yahoo.com wrote:
>>
>>>The reason is that I am still trying to figure out
>>>what a value is myself.  Do all objects have values?
>>
>>Yes.
> 
> 
> Can you justify this, other than by quoting the manual whose problems
> caused this question to be raised in the first place?

The Python manual's claim there is solidly grounded. The logic
of 'types' is reasonably well-defined in the discipline. Each
instance of a type takes exactly one element from the type's
set of values (at least at a particular time).


>>>What the value of object()?  A few weeks ago I turned
>>>to that page for enlightenment, with the results I reported.
>>
>>I think type 'object' has only one value, so that's it.
> 
> In that case, they should all be equal, right?
>>>>object() == object()
> 
> False
> 
> Looks like they have different values to me.

Whether the '==' operation conforms to your idea of what equality
means is unclear. Maybe I was wrong, and the object's identity
is part of its abstract state.

> Or maybe an object is valueless, in spite of what the manual says.

We know that's not true.


-- 
--Bryan




More information about the Python-list mailing list