
April 1, 2020
8:58 p.m.
On Wed, Apr 01, 2020 at 07:00:00PM -0700, Christopher Barker wrote:
But with all that, I don't see why such a "mutable string" would be more suitable for "string builder" pattern.
It would in one small way, which is that it would be usable directly in many (not all by any means) contexts where strings are used
I don't think that this is likely to be the case. I think it was Andrew (apologies for misattributing this if it was someone else) who pointed out that the CPython internals make a lot of assumptions about strings that would make it very difficult to retrofit a mutable string class to be usable in its place. -- Steven