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

Conrad Irwin conrad.irwin at googlemail.com
Thu Apr 15 15:31:49 CEST 2010

On 04/15/2010 12:37 PM, spir ☣ wrote:
> Hello,
> I have been recently thinking at lexical distinctions around the notion of data. (--> eg for a starting point http://c2.com/cgi/wiki?WhatIsData) Not only but 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"?
> What useful distinctions are or may be done, for instance in documentation?
> What kind of difference in actual language semantics may such distinctions mirror?

Uh.. you are trying to have a discussion about detailed semantics
without defining what you mean by any of your terminology.

As I see it (which is undoubtedly misleading in many respects):

 the set of all data is a countably infinite and unordered.
   (perhaps segments of memory)
 the set of all values is a countably infinite and partially ordered.
 an object is a member of the set of (datum, value) pairs.
   (perhaps a memory address coupled with a type)

In Python, each object with a different value has a different datum (and
for the most part, objects with the same values have different data
too). The only operation that concerns that datum of an object is the
"is" operator.

The value of an object is more useful, and this is what all the other
comparison operators (and most other functions) deal with. It shouldn't
be necessary to make the distinction between an object and its value in
documentation (though it is (I presume) occasionally useful in actual
code to distinguish objects with the same datum, perhaps in cycle


> Denis
> 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. How to denote a single unit of data wothout using the phrase "piece of data"? Can one still use "datum" or "datas" (or "data" as plural) and be trivially understood by *anybody* (not only scientists)? Or else what word should one use?

You can use datum/data as countable but it sounds forced (as above).

More information about the Python-ideas mailing list