String concatenation vs. string formatting
rosuav at gmail.com
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 pearwood.info> 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