[Python-Dev] Tuples vs. lists

Guido van Rossum guido@python.org
Thu, 24 Jan 2002 13:07:24 -0500


> Sure, but then I can't just copy references to the tuple when creating a
> copy of an instance, I'd have to copy the entire list.  That's what I
> meant by efficiency.  There are important semantic differences coming
> from the fact that tuples are immutable and lists are mutable, and I
> think that a strict heterogeneous/homogenous distinction loses that.

Well, as long as you promise not to change it, you *can* copy a
reference, right?  I guess I don't understand your application
enough -- do you intend this to be a starting point that is modified
during the program's execution, or is this a constant array?

--Guido van Rossum (home page: http://www.python.org/~guido/)