On 3/28/2013 10:37 PM, Steven D'Aprano wrote:

Under what circumstances will a string be created from a wchar_t string?
How, and why, would such a string be created? Why would Python still
support strings containing surrogates when it now has a nice, shiny,
surrogate-free flexible representation?

I believe because surrogates are legal codepoints and users may put them in strings even though python does not (except for surrogate_escape error handling).

I believe some of the internal complexity comes from supporting the old C-api so as to not immediately invalidate existing extensions.

--
Terry Jan Reedy

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to