On 7/1/2020 1:20 PM, M.-A. Lemburg wrote:
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
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.
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/python-dev@python.org/message/MA7U7A6OCO46TEWXRKHGDRBYH5FMWJUP/
Code of Conduct: http://python.org/psf/codeofconduct/