No Thoughts about Everything

John Roth newsgroups at jhrothjr.com
Wed Feb 25 12:21:17 EST 2004


"b-blochl" <bblochl2 at compuserve.de> wrote in message
news:mailman.106.1077724046.8594.python-list at python.org...
> I wonder about the huge traffic in the question how many  tuples are
> dispensible. I find that a question of only ternary or quarterny order -
> use it or use it not (free after Shakespears "to be or not to be). Well,
> I had my part on that.
>
> But introducing students to python as a first programming language lists
> and tuples are astoninglishy always constant points of confusion as well
> as the other points of the citatet list. I will not repeat it now, but
> the class-questions are more interesting for me and fundamental for the
> choice of python.

Tuples can be difficult if they're not explained properly, and
I don't find a lot of good material around that really brings
out the salient points.

For me at least, the basic thing about tuples is that they're a
quick way of bundling a bunch of objects together when you
don't want to go to the trouble of creating a special purpose
object to hold them.

I think that the use of implicit tuple creation on the return statement
and sequence unpacking make this point quite well.

I find that classifying them as sequences is essentially confusing,
and also stating that they're immutable is, while true, also confusing.



>
> Thanks in advance
> Bernhard
>
>
>
>





More information about the Python-list mailing list