[Python-Dev] len(chr(i)) = 2?

Alexander Belopolsky alexander.belopolsky at gmail.com
Sat Nov 20 23:32:28 CET 2010


On Sat, Nov 20, 2010 at 4:05 AM, "Martin v. Löwis" <martin at v.loewis.de> wrote:
..
> A technical correct description would be to say that Python uses either
> 16-bit code units or 32-bit code units; for brevity, these can be called
> narrow and wide code units.

+1

PEP 261 introduced terms "wide Py_UNICODE" and "narrow Py_UNICODE,"
but when discussion is at Python level, I don't think we should use
names of C typedefs.   I think "wide/narrow Unicode" builds describe
the two options clearly and unambiguously.   I prefer Python-specific
terminology to Unicode terms because in Python reference documentation
we often discuss details that are outside of the scope of Unicode
Standard.  For example, interpretation of lone surrogates on narrow
builds is one such detail.


More information about the Python-Dev mailing list