[Python-Dev] Usage of += on strings in loops in stdlib

Terry Reedy tjreedy at udel.edu
Wed Feb 13 02:51:46 CET 2013


On 2/12/2013 6:20 PM, MRAB wrote:

> Tuples are much like immutable lists; sets were added, and then frozensets;
> should we be adding mutable strings too (a bit like C#'s StringBuilder)?
> (Just wondering...)

StringIO is effectively a mutable string with a file interface.
sio.write('abc') is the equivalent of lis.extend(['a', 'b', 'c']).


-- 
Terry Jan Reedy



More information about the Python-Dev mailing list