[issue39560] PyUnicode_FromKindAndData kind transformation is not documented

New submission from Santiago M. Mola <santi@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@python components: Documentation messages: 361426 nosy: docs@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@bugs.python.org> <https://bugs.python.org/issue39560> _______________________________________

Ananthakrishnan <ananthakrishnan15.2001@gmail.com> added the comment: Can i add a pull request for this. ---------- nosy: +Ananthakrishnan _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue39560> _______________________________________

Change by Zackery Spytz <zspytz@gmail.com>: ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 3.0 -> 4.0 pull_requests: +22710 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23848 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue39560> _______________________________________
participants (3)
-
Ananthakrishnan
-
Santiago M. Mola
-
Zackery Spytz