[Python-ideas] "value" ~ "data" ~ "object"
Guido van Rossum
guido at python.org
Thu Apr 15 21:00:23 CEST 2010
2010/4/15 Bruce Leban <bruce at leapyear.org>:
> data = plural of datum
> both words are commonly misused as to singular/plural usage.
Too pedantic.
> "piece/unit/item of data" is a common substitution for "datum" by people who
> don't know the word. [Likewise, "media" is the plural of "medium" but people
> get that confused too.]
> With numbers, a single number is a datum. More than one numbers are data.
> You would never refer to "the value X" (where X is a python variable) but
> you would refer to "the value 3" or "the value pi". Generally, in English
> when people say "data" they're referring to the numbers in a more abstract
> sense than 3 and pi.
> I would say that roughly:
> value : datum :: instance : object
>
> But this is hardly precise. People frequently refer to A as an object when
> we really mean it's an instance of the object [e.g., class] Alpha.
No. In Python, object always refers to an instance. "An instance of an
object" is nonsense (unless the object happens to be a class object,
in which case the object's class is also called a metaclass).
We do use type and class interchangeably in Python. (Except in very
old Python versions where type refers to a built-in type or a type
defined by a built-in or extension module, and class refers to a
user-defined class -- but in modern Python there is no longer a
difference.)
--
--Guido van Rossum (python.org/~guido)
More information about the Python-ideas
mailing list