mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
bpo-39560: Document PyUnicode_FromKindAndData() kind transformation (GH-23848)
This commit is contained in:
parent
8b93f0e696
commit
4eed2821d4
1 changed files with 6 additions and 0 deletions
|
|
@ -421,6 +421,12 @@ APIs:
|
|||
:c:func:`PyUnicode_KIND`). The *buffer* must point to an array of *size*
|
||||
units of 1, 2 or 4 bytes per character, as given by the kind.
|
||||
|
||||
If necessary, the input *buffer* is copied and transformed into the
|
||||
canonical representation. For example, if the *buffer* is a UCS4 string
|
||||
(:c:macro:`PyUnicode_4BYTE_KIND`) and it consists only of codepoints in
|
||||
the UCS1 range, it will be transformed into UCS1
|
||||
(:c:macro:`PyUnicode_1BYTE_KIND`).
|
||||
|
||||
.. versionadded:: 3.3
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue