Mutable strings

Gordon Airport uce at ftc.gov
Sat Sep 20 13:40:39 EDT 2003


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. And which would be the default 
return type for functions returning strings...
It looks like there are ways of handling this by digging around in the 
modules for more basic types, but it would be much nicer to have it 
available at 'user level'.





More information about the Python-list mailing list