Editable strings anyone?

Paul Rubin phr-n2002a at nightsong.com
Mon Feb 18 05:35:24 CET 2002


"Jason Orendorff" <jason at jorendorff.com> writes:
> > Do a half million characters get copied around for each of the 
> > delete operations?
> 
> Yes.  There's no gap in arrays.

OK.  I guess the simplest approach to editable strings is to have a new type of array
that has multiple segments and implements the buffer interface.  Then the re module
can be extended to handle the buffer interface, if it doesn't handle it already.
Doesn't sound too bad--if I get industrious I might hack this up.



More information about the Python-list mailing list