[Python-Dev] Usage of += on strings in loops in stdlib

Serhiy Storchaka storchaka at gmail.com
Wed Feb 13 12:37:44 CET 2013


On 13.02.13 09:52, Nick Coghlan wrote:
> On Wed, Feb 13, 2013 at 5:42 PM, Alexandre Vassalotti
> <alexandre at peadrop.com> wrote:
>> I don't think so. Ropes are really useful when you work with gigabytes of
>> data, but unfortunately they don't make good general-purpose strings.
>> Monolithic arrays are much more efficient and simple for the typical
>> use-cases we have in Python.
>
> If I recall correctly, io.StringIO and io.BytesIO have been updated to
> use ropes internally in 3.3.

io.BytesIO has not yet. But it will be in 3.4 (issue #15381).

On the other hand, there is a plan for rewriting StringIO to more 
effective continuous buffer implementation (issue #15612).



More information about the Python-Dev mailing list