Super Tuples

Cliff Crawford cjc26 at nospam.cornell.edu
Thu Dec 30 22:01:57 EST 1999


Pada 30 Dec 1999 15:49:45 +0100, Magnus L. Hetland bilang:
| 
| I guess these things in Python have a lot to do with the underlying
| C-implementation, since tuples in many circumstances are quite
| efficient, and one-element tuples may be used to be consistent
| sometimes.

I thought that lists and tuples had the same underlying implementation
(C arrays).  The only difference is that lists are mutable while tuples
aren't.
Actually, this has always bugged me--you'd think that "lists" would be
similar to lists in Lisp (i.e. constant time insertions and deletions),
but they're not.  It seems to me it would make more sense to implement
mutable sequences using a linked list rather than an array.


-- 
cliff crawford   http://www.people.cornell.edu/pages/cjc26/
-><-             "You and your stupid orthography" -- Mark



More information about the Python-list mailing list