String concatenation vs. string formatting

Chris Angelico rosuav at
Sat Jul 9 02:16:55 EDT 2011

On Sat, Jul 9, 2011 at 3:30 PM, Steven D'Aprano
<steve+comp.lang.python at> wrote:
> It also doesn't generalise: only appends are optimized, not prepends.
> If you're interested in learning about the optimization:

>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

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.


More information about the Python-list mailing list