[Python-ideas] "value" ~ "data" ~ "object"

Alan Gauld alan.gauld at btinternet.com
Thu Apr 15 23:37:51 CEST 2010


"spir ☣" <denis.spir at gmail.com> wrote

Lots of points here and I suspect the English usage will vary greatly 
between
the different English communities.

>especially in Python. I ended up with the following questions:
> Can one state "in Python value=data=object"?
> Can one state "in Python speak value=data=object"?

I'm not sure I understand your distinction between the two statements.

I think in Python it's true to say that value=object but the rule is not 
commutative.
object !=value in every case. (A function is an object but is not really a 
value
(although it will return a value if called, and of course has an id() and 
is
"not None", so in that sense is a value - but that is I think a special 
case)

Data is a concept and is wider than mere values or objects. values can be 
data.
But so can rules. Now a rule can be expressed as a function or as a 
mapping,
and the mapping will contain values, but the mapping - the relationships - 
are
not explicit values, they are rules inherent to the mapping. But the 
mapping
is data.

Objects differ from pure values in most languages in that they usually 
(always?)
have operations (at least a constructor, and in modern Python much more). 
But
since I said that all values in Python are objects their difference here is 
moot.

> What useful distinctions are or may be done, for instance in 
> documentation?
> What kind of difference in actual language semantics may such 
> distinctions mirror?

My dictionary defines data as
    facts or figures from which conclusions can be inferred; information

facts are not always the same as values (defined as "measures" so by 
definition
relative - you can compare values against a known datum of similar type
(which is another concept again!) but you cannot really compare facts other
than by their truthfulness, but then, an untruthful fact is not a fact!)

> PS: side-question on english:
> I am annoyed by the fact that in english "data" is mainly used & 
> understood
> as a collective (uncountable) noun. "datum" (singular) & "datas" (plural) 
> seem
> to be considered weird.

Speaking for the English English:
"datas" is weird, in fact it is a non-word so far as I know.
"datum" is perfectly acceptable and most well read people will recognise it
although it is not a commonly used word. But it is by no means restricted 
to the
scientific community.
Common parlance uses data as both plural and singular, much as sheep is
used both ways. "data set" is often used when plurality is being 
emphasised.
(I have a friend (who works in MIS systems) who is very particular about 
his
use of data/datum.)

> How to denote a single unit of data wothout using the phrase "piece of 
> data"?

datum does just fine. Or sometimes "data point" is used.

> Can one still use "datum" or "datas" (or "data" as plural) and be 
> trivially
> understood by *anybody* (not only scientists)?

datum and data are fine when the plurality is obvious. Otherwise I tend to
use data set to emphasise plurality. Never use datas!

HTH,

-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/ 





More information about the Python-ideas mailing list