This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: PyUnicode_FromKindAndData kind transformation is not documented
Type: Stage: resolved
Components: Documentation Versions: Python 3.9, Python 3.8, Python 3.7, Python 3.6, Python 3.5
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Ananthakrishnan, ZackerySpytz, docs@python, nanjekyejoannah, smola
Priority: normal Keywords: patch

Created on 2020-02-05 12:52 by smola, last changed 2022-04-11 14:59 by admin.

Pull Requests
URL Status Linked Edit
PR 23848 merged ZackerySpytz, 2020-12-18 21:23
Messages (3)
msg361426 - (view) Author: Santiago M. Mola (smola) Date: 2020-02-05 12:52
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).
msg362280 - (view) Author: Ananthakrishnan (Ananthakrishnan) * Date: 2020-02-19 15:43
Can i add  a pull request for this.
msg395000 - (view) Author: Joannah Nanjekye (nanjekyejoannah) * (Python committer) Date: 2021-06-03 13:33
New changeset 4eed2821d40373345ed133b2b8d912fef59acab7 by Zackery Spytz in branch 'main':
bpo-39560: Document PyUnicode_FromKindAndData() kind transformation (GH-23848)
https://github.com/python/cpython/commit/4eed2821d40373345ed133b2b8d912fef59acab7
History
Date User Action Args
2022-04-11 14:59:26adminsetgithub: 83741
2021-06-03 14:11:05nanjekyejoannahsetstage: patch review -> resolved
2021-06-03 13:33:51nanjekyejoannahsetnosy: + nanjekyejoannah
messages: + msg395000
2020-12-18 21:23:53ZackerySpytzsetkeywords: + patch
nosy: + ZackerySpytz

pull_requests: + pull_request22710
stage: patch review
2020-02-19 15:43:48Ananthakrishnansetnosy: + Ananthakrishnan
messages: + msg362280
2020-02-05 12:52:13smolacreate