osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Question about the definition of the value of an object


On 11/19/2018 9:08 AM, Iwo Herka wrote:
> Hello everyone,
> 
> I've been looking for something in the documentation
> (https://docs.python.org/3.8/reference/datamodel.html) recently
> and I've noticed something weird. Documentation states that every
> object has a value, but doesn?t provide any definition
> whatsoever of what the value is.

Python is a language for manipulating information stored in Python 
objects.  Abstractly, object values are the mostly implementation- and 
even language-independent information that we wish to manipulate.  Note 
that concrete types are somewhat implementation dependent and ids are 
implementation and session dependent.

Bools represent binary choices, not 'truth' per se.  We call the choices 
'True' and 'False' because that (with or without capitals) is the 
default binary choice in propositional logic.  For numbers, 0 versus not 
0 is often an important choice.  Ditto for 'empty' versus 'not empty' 
for collections.

-- 
Terry Jan Reedy