[Python-Dev] The "lazy strings" patch
Fredrik Lundh
fredrik at pythonware.com
Sat Oct 21 09:10:19 CEST 2006
Talin wrote:
> Interesting - is it possible that the same technique could be used to
> hide differences in character width? Specifically, if I concatenate an
> ascii string with a UTF-32 string, can the up-conversion to UTF-32 also
> be done lazily?
of course.
and if all you do with the result is write it to an UTF-8 stream, it
doesn't need to be done at all. this requires a slightly more elaborate
C-level API interface than today's PyString_AS_STRING API, though...
(which is why this whole exercise belongs on the Python 3000 lists, not
on python-dev for 2.X)
</F>
More information about the Python-Dev
mailing list