Mailing List Archive

Tuples & lists
I'm a new user and Python looks great.

Why both having tuples and lists? As far as I can see there're the same, but
tuples are read only..? Have I missed something in the tutorial?

Also, has anyone written a tcl/tk dialog/resource editor type thing so you
could save a form out as code? Could save a lot of time...

Thanks,
Nick.
Tuples & lists [ In reply to ]
From: "Nick" <nick@NOSPAMvideosystem.co.uk>

I'm a new user and Python looks great.

Why both having tuples and lists? As far as I can see there're the same, but
tuples are read only..? Have I missed something in the tutorial?

Also, has anyone written a tcl/tk dialog/resource editor type thing so you
could save a form out as code? Could save a lot of time...

Thanks,
Nick.
Tuples & lists [ In reply to ]
In article <377bbde1@news.xtml.co.uk>, nick@NOSPAMvideosystem.co.uk says...

>Why both having tuples and lists? As far as I can see there're the same, but
>tuples are read only..? Have I missed something in the tutorial?

There is probably something in the the FAQ. BAsically, tuples are stored
more compactly and can be used as dictionary keys (because they ARE
readonly).

TJR
Tuples & lists [ In reply to ]
From: tjreedy@udel.edu (Terry Reedy)

In article <377bbde1@news.xtml.co.uk>, nick@NOSPAMvideosystem.co.uk says...

>Why both having tuples and lists? As far as I can see there're the same, but
>tuples are read only..? Have I missed something in the tutorial?

There is probably something in the the FAQ. BAsically, tuples are stored
more compactly and can be used as dictionary keys (because they ARE
readonly).

TJR
Tuples & lists [ In reply to ]
From: "Darrell" <news@dorb.com>

Did an experiment on NT and lists and tuples took the same amount of space.
Humm ? Not what I expected.

--
--Darrell
Terry Reedy <tjreedy@udel.edu> wrote in message
news:7lh375$5ea$1@news.udel.edu...
> In article <377bbde1@news.xtml.co.uk>, nick@NOSPAMvideosystem.co.uk
says...
>
> >Why both having tuples and lists? As far as I can see there're the same,
but
> >tuples are read only..? Have I missed something in the tutorial?
>
> There is probably something in the the FAQ. BAsically, tuples are stored
> more compactly and can be used as dictionary keys (because they ARE
> readonly).
>
> TJR
>
Tuples & lists [ In reply to ]
Did an experiment on NT and lists and tuples took the same amount of space.
Humm ? Not what I expected.

--
--Darrell
Terry Reedy <tjreedy@udel.edu> wrote in message
news:7lh375$5ea$1@news.udel.edu...
> In article <377bbde1@news.xtml.co.uk>, nick@NOSPAMvideosystem.co.uk
says...
>
> >Why both having tuples and lists? As far as I can see there're the same,
but
> >tuples are read only..? Have I missed something in the tutorial?
>
> There is probably something in the the FAQ. BAsically, tuples are stored
> more compactly and can be used as dictionary keys (because they ARE
> readonly).
>
> TJR
>