On 2008-01-31, Terran Melconian <[EMAIL PROTECTED]> wrote: > * Why are there no real mutable strings available?
[...] > I want to be able to accumulate a string with +=, not by going > through an intermediate list and then doing ''.join(), So what's stopping you? >>> s = "one" >>> s += " two" >>> s 'one two' >>> > because I think the latter is ugly. Then don't do it. :) > There are also times when I'd like to use the string as a > modifiable buffer. That would be an array of characters or bytes: http://docs.python.org/lib/module-array.html > Is the python idiom that this is actually the Right Thing for > reasons I'm not seeing? I'm not sure what you're asking. AFAIK, the main reason that strings are immutable is so they can be used as dict keys. > Is there a fundamental reason it would be hard to > implement a mutable string in cpython? What problem would a mutable string solve that an array of chars won't? > * What's the best way to initialize a list of lists? Hmm. I guess I never need to do that. > * Is there a way to get headings in docstrings? Docstrings? Real Men Don't Write Docstrings! -- Grant Edwards grante Yow! Now, let's SEND OUT at for QUICHE!! visi.com -- http://mail.python.org/mailman/listinfo/python-list