[Tutor] "value" ~ "data" ~ "object"
steve at pearwood.info
Fri Apr 16 03:02:42 CEST 2010
On Thu, 15 Apr 2010 09:37:02 pm spir ☣ wrote:
> 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
> Can one state "in Python speak value=data=object"?
I don't think so -- this is mistaking the map for the territory.
Objects are the concrete representation ("the map") in the memory of a
computer of some data ("the territory"). The Python object 42 is not
the integer 42, which is an abstract mathematical concept. The Python
object my_list_of_countries is not an actual list of countries, it is a
representation of a list containing representations of countries.
The dictionary definition of value generally describes it as a number,
e.g. from WordNet:
a numerical quantity measured or assigned or computed; "the value
assigned was 16 milliseconds"
9. (Math.) Any particular quantitative determination; as, a function's
value for some special value of its argument.
In modern terms, we extend this to other types of data: we might say the
value of the variable A is the string 'elephant'.
So I would say things like:
a variable HAS a value;
the bit pattern 00001001 REPRESENTS the integer nine
an object REPRESENTS a value;
a name REFERS TO (points to, is bound to) an object;
and similar. To say that the (say) the variable x IS 9 is verbal short
hand. Who has never pointed at a spot on the map and said "That's where
we have to go"? We all treat the map as the territory sometimes.
> What useful distinctions are or may be done, for instance in
> documentation? What kind of difference in actual language semantics
> may such distinctions mirror?
I think that, 99% of the time, it is acceptable to treat the map as the
territory and treat variables as BEING values. Just write the
documentation in the most natural way:
def walk(self, direction):
"""Cause the elephant to walk in the direction given."""
def _move_leg(self, leg):
"""Private method that operates the elephant's given leg."""
Trying to be pedantic about values, data and in-memory representations
is rarely necessary.
> 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.
"Datas" has never been the plural of data. Datum is the singular, data
Over the last few decades, data is slowly shifting to be an uncountable
noun, like "water", "air" or "knowledge", and datum has become very
old-fashioned. I would still expect most people would recognise it, or
at least understand it from context.
Collective noun is incorrect. Collective nouns are things like "a FLOCK
of geese", "a PILE of books", "a SET of spanners", or "a GROUP of
people". The term you are thinking of is mass noun.
> How to denote a single
> unit of data wothout using the phrase "piece of data"?
You can still use datum, although it is becoming obsolete it is not gone
yet. But if you treat data as uncountable, then like any uncountable
noun you have to supply a unit or amount:
Item of data.
Element of data.
Great big lump of data.
42 bytes of data.
More information about the Tutor