An alternative way to do it would be to simply remove the "str.__init__(self, str_)" line. That would be a slightly more minimal change, but your complete conversion to use __new__ is probably more technically correct, though both should accomplish exactly the same result.
I agree that the patch is sane.
An alternative way to do it would be to simply remove the "str.__init__(self, str_)" line. That would be a slightly more minimal change, but your complete conversion to use __new__ is probably more technically correct, though both should accomplish exactly the same result.