4 ms·
Why doesn't StringIO count as a string buffer?
by nyellin 15y ago
Why doesn't StringIO count as a string buffer?
- kragen 15y agoSir or madam, you may have an excellent point, there. But I haven't looked at how cStringIO is implemented: does it construct a list of strings and then join them when they are requested, thus keeping alive all the string objects passed to it? Or does it concatenate the bytes into a buffer? I just realized that the Python 3 memoryview object also provides the wherewithal to construct a string buffer, even in pure Python.