On 10/01/2011 09:06 PM, Victor Stinner wrote:
Another alternative is a "string-join" object. It is discussed (and
implemented) in the following issue, and PyPy has also an optional
implementation:

http://bugs.python.org/issue1569040
http://codespeak.net/pypy/dist/pypy/doc/interpreter-optimizations.html#string-
join-objects


Yes, actually I was planning on trying to revive my "lazy string concatenation" patch once PEP 393 landed. As I recall it, the major roadblock to the patch's acceptance was that it changed the semantics of PyString_AS_STRING(). With the patch applied, PyString_AS_STRING() could now fail and return NULL under low-memory conditions. This meant a major change to the C API and would have required an audit of 400+ call sites inside CPython alone. I haven't studied PEP 393 yet, but Martin tells me PyUnicode_READY would be a good place to render the lazy string.

Give me a week or two and I should be able to get it together,


/larry/
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to