tuple.index()

greg greg at cosc.canterbury.ac.nz
Sun Dec 17 19:48:15 EST 2006


Roy Smith wrote:

> The struct does lookup by name, the tuple is inherently index based.

I was trying to help people understand the distinction
we're talking about by showing an example of the same
distinction in another language where it's much clearer.

There are a great many ways in which C structs are
different from Python tuples, and C arrays are different
from Python lists. But they're not the aspects I'm
drawing an analogy between.

--
Greg



More information about the Python-list mailing list