[Python-Dev] re: syntax - "Aren't tuples redundant?"

David Ascher dascher@mindspring.com
Thu, 3 Feb 2000 13:01:48 -0800


GmCm
> [Greg Wilson]
>
> > 4. "Aren't tuples redundant?"

> To my mind, the "can act as dictionary key" argument is a red
> herring. Tuples and lists may technically be almost the same
> thing, but I find I hardly ever need to ponder whether I should
> use a tuple or a list. Tuples are structures and lists are
> containers.

They're not structures the way a C programmer thinks of a struct or a pascal
programmer thinks of a record.

Do you have a better way of justifying their existence to novices who
haven't reached the zen?  It's a nontrivial pedagogical problem in my
experience as well. (yes, this is a better topic for edu-sig than for
python-dev).

--david