[issue38398] PyUnicode functions are not exported by python 2 in Ubuntu

STINNER Victor report at bugs.python.org
Mon Oct 7 12:20:43 EDT 2019


STINNER Victor <vstinner at python.org> added the comment:

> hasattr(ctypes.pythonapi, "PyUnicode_FromWideChar")

Python 2 has a surprising ABI. The function names depending on the Unicode implementation:

PyUnicodeUCS2_FromWideChar on Windows, PyUnicodeUCS4_FromWideChar on other platforms.

Enjoy the ugly https://github.com/python/cpython/blob/2.7/Include/unicodeobject.h

And say hello to the new compact Unicode strings, PEP 393, implemented in Python 3.3, which unified that!
https://www.python.org/dev/peps/pep-0393/

----------
nosy: +vstinner
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38398>
_______________________________________


More information about the Python-bugs-list mailing list