[Python-Dev] PEP 393 Summer of Code Project

Victor Stinner victor.stinner at haypocalc.com
Wed Aug 24 00:46:16 CEST 2011


Le lundi 22 août 2011 20:58:51, Torsten Becker a écrit :
> [1]: http://www.python.org/dev/peps/pep-0393

state:
lowest 2 bits (mask 0x03) - interned-state (SSTATE_*) as in 3.2
next 2 bits (mask 0x0C) - form of str:
00 => reserved
01 => 1 byte (Latin-1)
10 => 2 byte (UCS-2)
11 => 4 byte (UCS-4);
next bit (mask 0x10): 1 if str memory follows PyUnicodeObject

kind=0 is used and public, it's PyUnicode_WCHAR_KIND. Is it still necessary? 
It looks to be only used in PyUnicode_DecodeUnicodeEscape().

Victor



More information about the Python-Dev mailing list