Advantage of the array module over lists?

Piet Delport pjdelport at
Fri Mar 28 20:14:37 CET 2008

On Mar 17, 1:49 am, "Diez B. Roggisch" <deets at> wrote:
> I doubt that. AFAIK both arrays and lists are continuous memory-areas,
> that double (at least to a certain threshold or so) when reaching the
> capacity limit.

For what it's worth, lists over-allocate by ~1/8, and arrays by ~1/16.
(Details in listobject.c:list_resize and arraymodule.c:array_resize.)

More information about the Python-list mailing list