Mutable strings

Peter Hansen peter at engcorp.com
Sat Sep 20 15:54:10 EDT 2003


Gordon Airport wrote:
> 
> Has anyone suggested introducing a mutable string type (yes, of course)
> and distinguishing them from standard strings by the quote type - single
> or double? As far as I know ' and " are currently interchangeable in all
> circumstances (as long as they're paired) so there's no overloading to
> muddy the language. Of course there could be some interesting problems
> with current code that doesn't make a distinction, 

> but it would be dead easy to fix with a search-and-replace. 
         ^^^^^^^^^^^^^^^^^^^^^^^^^
No, it definitely would not.  You would also have to account for 
embedded quotation marks that are not escaped already, and I'm 
certain there are other complications.

It might be worth your writing a PEP, however, if only so that the
idea could be killed and buried for good. ;-)

-Peter




More information about the Python-list mailing list