Collections of non-arbitrary objects ?

walterbyrd walterbyrd at iname.com
Wed Jun 27 12:30:35 EDT 2007


On Jun 26, 8:23 am, Bruno Desthuilliers <bruno.
42.desthuilli... at wtf.websiteburo.oops.com> wrote:
> walterbyrda écrit :
>
> >> You do program carefully, don't you ?-)
>
> > I try. But things like typos are a normal part a life.
>
> So are they in any language. I fail to see much difference here.
>

For example: if I mis-type a variable name in C, the program will
probably not even compile. Whereas, with Python, the program will
probably run, but may give unexpected results.


> > Guido
> > must think python has a lot of room for improvement since he's
> > completely throwing out backward compatibility with python 3000.
>
> Not "completely throwing out". Just allowing *some* major breakages -
> the kind you usually get with each major release of other languages, but
> that Python managed to avoid as much as possible so far.

I don't know, but here is a direct quote from Guido's blog: "Python
3.0 will break backwards compatibility. Totally."

http://www.artima.com/weblogs/viewpost.jsp?thread=208549

>
> > It seems to me that tuple are essentially immutable lists.
>
> They are not (even if you can use them that way too). FWIW and IIRC,
> this is a FAQ.

A few posters here have stated that tuples are not just immutable but
when I compare lists, to tuples, I notice that both are ordered
collections of arbitrary objects, with the primary difference being
that list are mutable, and tuples are not. It seems to me that if a
list were immutable, it would be a tuple. That is the one big
difference.

Tuples have been compared to records/structures in other languages.
But, in general, I can not use a for loop to loop through the fields
in a record, and I can not sort those fields either.




More information about the Python-list mailing list