It's not a matter of *what* can be done, but how *efficiently* it can be
done. Under the best of circumstances a list (or dynamically sized and
mutable sequence) can't perform at the level of a statically sized array.
What makes you think that Python's list type is implemented as a linked
list? It's not...
(I believe it's a malloc-ed block of memory holding an array of PyObject
pointers, plus a bit of logic to support resizing and the like, but look
at the sources if you care...)
Paul.
ยทยทยท
From: gary.h.merrill@gsk.com [mailto:gary.h.merrill@gsk.com]