Is 'everything' a refrence or isn't it?
fakeaddress at nowhere.org
Sat Jan 14 20:26:06 EST 2006
Mike Meyer wrote:
> Bryan Olson <fakeaddress at nowhere.org> writes:
>>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?
>>>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).
Are not hard to find. In Niklaus Wirth's /Algorithms + Data
Structures = Programs", the first section after "introduction"
"The concept of data type". Wikipedia has reasonable articles
on datatype and abstract datatype. That an instance takes a
value is too obvious to state, but clearly implied by discussion
of an object's value. If you're familiar with other programming
languages, you can to those. There are no values of C's 'void'
type, and consequently there are never any objects of type void.
>>>>>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()
>>>Looks like they have different values to me.
>>Whether the '==' operation conforms to your idea of what equality
>>means is unclear.
> Care to say what it does mean, then?
I think that's now been answered a few times. In this case,
it means comparison of object identity.
>>Maybe I was wrong, and the object's identity
>>is part of its abstract state.
> Is abstract state always part of the value?
The abstract state, sometimes called the "logical state", is
the value the object represents.
>>>Or maybe an object is valueless, in spite of what the manual says.
>>We know that's not true.
> You claim it's not true, but didn't provide anything to back up those
> claims, or even alternatives to explain the apparent discrepancy in
I didn't see a discrepancy in behavior and the manual is the
definition of the language. The concept of a valueless object
is inconsistent with a great deal material.
More information about the Python-list