
On Tue, Mar 31, 2020 at 10:25 AM Christopher Barker <pythonchb@gmail.com> wrote:
As others have pointed out, the OP started in a bit of an oblique way, but it maybe come down to this:
There are some use-cases for a mutable string type. And one could certainly write one.
presto: here is one:
https://github.com/Daniil-Kost/mutable_strings
Which looks to me to be more a toy than anything, but maybe the author is seriously using it... (it does look like it has a bug indexing if there are non-ascii)
And yet, as far as I know, there has never been one that was carefully written and optimized, which would be a bit of a trick, because of how Python strings handle Unicode. (it would have been a lot easier with Python2 :-) )
You mean, it's a lot easier to write bytearray? :) ChrisA