Tuples, what are they: read-only lists or heterogeneous data arrays?
Gerrit Holl
gerrit at nl.linux.org
Wed Mar 12 08:02:39 EST 2003
Guido van Rossum wrote in Python-Dev:
> Tuples are for heterogeneous data, list are for homogeneous data.
> Tuples are *not* read-only lists.
This makes me wonder.
FAQ entry 6.15 states:
> 6.15. Why are there separate tuple and list data types?
> This is done so that tuples can be immutable while lists are mutable.
I don't understand. Doesn't this FAQ entry mean that tuples are read-only
lists? Why are tuples not read-only lists? Lists are for homogeneous data?
Well, [0, None, "twelve"] is perfectly legal, of course, so what does this
mean? I'm curious!
yours,
Gerrit.
--
Asperger Syndroom - een persoonlijke benadering:
http://people.nl.linux.org/~gerrit/
Het zijn tijden om je zelf met politiek te bemoeien:
http://www.sp.nl/
More information about the Python-list
mailing list