tuple.index()

greg greg at cosc.canterbury.ac.nz
Sun Dec 17 01:53:58 EST 2006


Nick Maclaren wrote:

>     A collection is inhomogeneous if, for some attribute that is needed
>     for at least one action on at least one element of the collection,
>     the attribute is not shared by all elements of the collection.

If you mean "attribute" in the Python sense, then this
is wrong, because you're just defining it in terms of
concrete types again.

There is no rigorous definition in Python terms, because
Python doesn't formally embody the concept. But that
doesn't mean the concept isn't real.

There are other languages that do embody it, for example,
C. A Python tuple is like a C struct, and a Python list
is like a C array.

--
Greg



More information about the Python-list mailing list