Thanks all for your advice. I'm not actually going to use the mutable string right at the moment, but I thought I might in the future and I was just curious if it existed. I suppose a list of characters is close enough for most purposes.
On Jul 22, 10:28 am, greg <g...@cosc.canterbury.ac.nz> wrote: > Ben Finney wrote: > > My point was rather meant to imply that > > subclassing the built-in (immutable)stringtypes was the best way to > > usefully get all their functionality > > However, it would be difficult to do that without changing > all C code that deals with strings, including that in extension > modules. > > That's because the existingstringtype stores the characters > in thestringobject itself. Amutablevariant would have to > contain a pointer to a resizable memory block, and therefore > couldn't be used as a drop-in replacement by existing C > code that expects astring. > > -- > Greg -- http://mail.python.org/mailman/listinfo/python-list