On Thu, Jan 13, 2011 at 7:45 PM, Chris Barker <Chris.Barker@noaa.gov> wrote:
On 1/13/2011 3:17 PM, Ian Mallett wrote:A bit OT, but they handle re-sizing by over allocating when appended to.
> > doing this. Python lists are just linked lists,
> no, they are not -- they are internally regular C arrays.
> But they are resizable, which implies they are either linked lists or
> array lists--because I doubt the pointers are copied over to a brand-new
> array just big enough each time a single element is added or removed.
So most of the time you can append to a list without any memory
allocation or copying, but as it grows, it does need to do that once in