tuple.index()

Christoph Zwerschke cito at online.de
Fri Dec 15 07:18:52 EST 2006


Maybe there would be less dispute if this dogma/convention(?) "Tuples 
are for heterogeneous data, list are for homogeneous data" would be 
written down somewhere in the tutorial, reference or in PEP8, so people 
would be aware of it.

And can somebody explain what is exactly meant with "homogenous data"? 
That the type of the elements is the same in some technical or 
philosophical meaning? Concretely speaking, which data type should I use 
for coordinate tuples? Usually, tuples are used. Does this mean that I 
should better use lists from now on because all the components have the 
same type?

-- Christoph



More information about the Python-list mailing list