terminological obscurity
"Martin v. Löwis"
martin at v.loewis.de
Thu May 27 13:30:40 EDT 2004
>>Really makes no difference at all - not just insignificant,
>>really _no_ difference. A truly heterogeneous sequence may
>>be full of references to the _same_ object (e.g., (1, 1, 1)),
>>and a truly homogeneous sequence may have objects as different
>>as None and a module. It's not about properties of the objects,
>>considered in isolation.
>
>
> You fundamentally miss my point.
>
> What you are saying is clear enough. You are also saying that this is
> what Guido meant, when he said something different. And leaving as
> anomolous why Guido didn't say what he meant himself.
What he did say is
"Tuples are for heterogeneous data, list are for homogeneous data.
Tuples are *not* read-only lists."
He did not actually define the terms that he was using (just as
he did not define the terms tuple, list, data, or read-only).
It is very clear to my why he did not say what Donn said - because
he thought that the notion of homogenous and heterogenous is obvious
to anybody.
He then *also* said something about how static typing might be
introduced into Python - but that was about possible static typing,
not about the terms "homogenous" and "heterogenous". Even with
static typing, it might be possible to declare a list that is
statically typed, contains homogenous data, and yet contains
objects as different as None and a module. The type of this
list might be "list of (NoneType union ModuleType)", better
declared as "list of optional ModuleType".
Regards,
Martin
More information about the Python-list
mailing list