terminological obscurity

Donn Cave donn at drizzle.com
Mon May 24 01:54:11 EDT 2004


Quoth Arthur <ajsiegel at optonline.com>:
| On Sun, 23 May 2004 16:13:14 -0000, "Donn Cave" <donn at drizzle.com>
| wrote:
|
|> I don't know what you mean by `outside the "tuple" sense of the word",
|> but in a way I think that may be nearly the problem.  Of course if you
|> consider these objects on their own, the contents of the tuple but
|> isolated from that context, they're as homogeneous as you could want,
|> in fact they would be the very same object.
|>
|> But (I hope) no one articulating this point of view says "homogeneous
|> data", or "homogeneous contents", etc. 
|
|
| http://mail.python.org/pipermail/python-dev/2003-March/033964.html
|
| Qutoeth Guido:
|
| "Tuples are for heterogeneous data, list are for homogeneous data."
|
| I have been trying to stict meticulously to his terminology, because
| my understanding is that is why it is being used.

It's too bad if he said that.  I think it has not led to mass confusion
because if one interpretation of that 10 word summary makes it an utterly
absurd proposition, most people are inclined to give him enough credit
to look for another interpretation.

I'm sure there has been enough discussion of this by now for anyone
who cared, but I can't resist a final observation.  Suppose we take
the absurd interpretation, and further decide to implement a test
for this condition, where we evaluate a sequence's homogeneity by
comparing its contents object by object.  Whatever the original
sequence may be, I can tell you right now that the natural sequence
type for object by object operations on its contents will be a list.
We're going to be very nearly sorting the data, in fact might use
sort() to start with if we're lazy, and that's a list operation.
Now since lists are for homogeneous data, and this is clearly an
application for a list, it can be seen that all sequences are
homogeneous, and tuples have no valid use!

There's your circular explanation.

	Donn Cave, donn at drizzle.com



More information about the Python-list mailing list