string building

John Salerno johnjsal at NOSPAMgmail.com
Mon Apr 3 18:38:58 EDT 2006


John Salerno wrote:
> Out of curiosity, is there any kind of equivalent in Python to the 
> StringBuilder class in C#? Here's a quick description from the .NET 
> documentation:
> 
> "This class represents a string-like object whose value is a mutable 
> sequence of characters. The value is said to be mutable because it can 
> be modified once it has been created by appending, removing, replacing, 
> or inserting characters."
> 
> It's used for dealing with large strings that otherwise would cause 
> performance problems if used as regular string objects. I'm just 
> wondering if Python has something like this, or if it is even really 
> necessary. I know there is even some discussion on when exactly 
> StringBuilder becomes useful over regular strings, but I imagine at some 
> point it is good to use.

Thanks guys, two interesting options to investigate! :)



More information about the Python-list mailing list