[issue39560] PyUnicode_FromKindAndData kind transformation is not documented

Santiago M. Mola report at bugs.python.org
Wed Feb 5 07:52:13 EST 2020


New submission from Santiago M. Mola <santi at mola.io>:

PyUnicode_FromKindAndData copies input data and transforms it to the most compact representation. This behavior is not documented.

Proposed wording:

> The input buffer is copied and transformed into the canonical representation, if necessary. For example, if the buffer is a UCS4 string (PyUnicode_4BYTE_KIND) and it consists only of codepoints in the UCS1 range, it will be transformed into UCS1 (PyUnicode_1BYTE_KIND).

----------
assignee: docs at python
components: Documentation
messages: 361426
nosy: docs at python, smola
priority: normal
severity: normal
status: open
title: PyUnicode_FromKindAndData kind transformation is not documented
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

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


More information about the Python-bugs-list mailing list