On Sat, Jul 9, 2011 at 3:30 PM, Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> wrote: > It also doesn't generalise: only appends are optimized, not prepends. > > If you're interested in learning about the optimization: > > http://utcc.utoronto.ca/~cks/space/blog/python/ExaminingStringConcatOpt
>From that page: "Also, this is only for plain (byte) strings, not for Unicode strings; as of Python 2.4.2, Unicode string concatenation remains un-optimized." Has the same optimization been implemented for Unicode? The page doesn't mention Python 3 at all, and I would guess that the realloc optimization would work fine for both types of string. ChrisA -- http://mail.python.org/mailman/listinfo/python-list