Editable strings anyone?

Jason Orendorff jason at jorendorff.com
Sun Feb 17 19:11:28 EST 2002


Paul Rubin wrote:
> Next question (what I need to examine the source for):  what 
> happens if you do
> 
>   x = array.array('c','a'*1000000)
>   del x[500000]
>   del x[500000]
>   del x[500000]
> 
> Do a half million characters get copied around for each of the 
> delete operations?

Yes.  There's no gap in arrays.

## Jason Orendorff    http://www.jorendorff.com/





More information about the Python-list mailing list