
As an example application, think of a database module which provides the Unicode data as Py_UNICODE buffer. You want to write this as UTF-8 data to a file or a socket, so you have the PyUnicode_EncodeUTF8() API decode this for you into a bytes object which you can then write out using the Python C APIs for this. But based on Victor's survey of usages in Python extensions, which found few to no uses of these APIs, it would seem that hypothetical applications are insufficient to justify the continued provision and
On 7/1/2020 1:20 PM, M.-A. Lemburg wrote: maintenance of these APIs. After all, Python extensions are written as a way to interface "other stuff" to Python, and converting data to/from Python objects seems far more likely than converting data from one non-Python format to a different non-Python format. Not that such applications couldn't be written as Python extensions, but ... are they? ... and why? A rich interface is nice, but an unused interface is a burden.