Steve Holden <[EMAIL PROTECTED]> wrote: ... > Presumably because it's necessary to extract the individual values > (though os.stat results recently became addressable by attribute name as > well as by index, and this is an indication of the originally intended > purpose of tuples).
Yep -- "time tuples" have also become pseudo-tuples (each element can be accessed by name as well as by index) a while ago, and I believe there's one more example besides stats and times (but I can't recall which one). Perhaps, if the tuple type _in general_ allowed naming the items in a smooth way, that might help users see a tuple as "a kind of ``struct''... which also happens to be immutable". There are a few such "supertuples" (with item-naming) in the cookbook, but I wonder if it might not be worth having such functionality in the standard library (for this clarification as well as, sometimes, helping the readability of some user code). Alex -- http://mail.python.org/mailman/listinfo/python-list