samwyse <[EMAIL PROTECTED]> wrote: ... > Actually, I'm surprised that the PEP does as much as it does. If tuples > are implemented as S-expressions, then something like this:
Tuples are implemented as compact arrays of pointer-to-PyObject (so are lists, BTW). So, for example, a 10-items tuple takes 40 bytes (plus a small overhead for the header) on a 32-bit build, not 80 as it would if implemented as a linked list of (pointer-to-object, pointer-to-next) pairs; addressing sometuple[N] is O(1), NOT O(N); etc, etc. Alex -- http://mail.python.org/mailman/listinfo/python-list