Mutable strings

logistix at cathoderaymission.net logistix at cathoderaymission.net
Mon Sep 22 09:05:51 EDT 2003


hjwidmaier at web.de (Hans-Joachim Widmaier) wrote in message news:<6e990e29.0309220251.51fa648d at posting.google.com>...
> Andy Jewell <andy at wild-flower.co.uk> wrote in message news:<mailman.1064086468.9586.python-list at python.org>...
> 
> > Mutable strings are one thing that I missed, initially, when I first star
> > ted 
> > using Python.  After a while, as the "Pythonic" way of doing things sank 
> > in, 
> > I realised that Python doesn't *need* mutable strings.
> 
> Mutable strings come to *my* mind whenever I have to play with huge
> binary data.  Working with tens of megabytes is inherently somewhat
> slow.
> 

import array
x = arrray.array('c')

Pretty much creates a mutable string for these cases, although the
interface is a little different.




More information about the Python-list mailing list